annotate debian/init @ 303:399ccb5e641b noffle

[svn] clarified init output
author godisch
date Sun, 16 Feb 2003 08:47:33 +0000
parents 3b5b7f3fd71f
children 08222dbe6eb0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
1 #!/bin/sh
303
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
2 # $Id: init 437 2003-02-16 08:47:33Z godisch $
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
3
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
4 PATH=/bin:/usr/bin:/sbin:/usr/sbin
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
5
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
6 NOFFLE=/usr/bin/noffle
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
7 if [ -x /usr/sbin/pppd ]; then
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
8 NOFFLE_FETCHMODE="ppp"
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
9 else
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
10 NOFFLE_FETCHMODE="cron"
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
11 fi
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
12 [ -f /etc/default/noffle ] && . /etc/default/noffle
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
13
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
14 [ -x "$NOFFLE" ] || exit 0
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
15
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
16 case "$1" in
303
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
17 online|offline)
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
18 echo "Switching offline news server to $1 mode: noffle."
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
19 $NOFFLE --$1
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
20 ;;
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
21 start)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
22 echo "Initializing offline news server: noffle."
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
23 [ "$NOFFLE_FETCHMODE" = ppp ] && $NOFFLE --offline
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
24 [ "$NOFFLE_FETCHMODE" = cron ] && $NOFFLE --online
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
25 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
26 stop)
303
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
27 $0 offline
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
28 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
29 restart|force-reload)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
30 $0 start
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
31 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
32 *)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
33 echo "Usage: $0 {start|stop}" >&2
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
34 exit 1
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
35 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
36 esac
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
37
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
38 exit 0