annotate debian/init @ 334:08222dbe6eb0 noffle

[svn] cleanup
author godisch
date Sat, 01 Mar 2003 17:40:38 +0000
parents 399ccb5e641b
children 1aa1ed030464
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
334
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
2 # $Id: init 470 2003-03-01 17:40:38Z 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
334
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
12 if [ -f /etc/default/noffle ]; then
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
13 . /etc/default/noffle
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
14 fi
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
15
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
16 [ -x "$NOFFLE" ] || exit 0
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
17
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
18 case "$1" in
303
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
19 online|offline)
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
20 echo "Switching offline news server to $1 mode: noffle."
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
21 $NOFFLE --$1
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
22 ;;
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
23 start)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
24 echo "Initializing offline news server: noffle."
334
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
25 if [ "$NOFFLE_FETCHMODE" = ppp ]; then
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
26 $NOFFLE --offline;;
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
27 else
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
28 $NOFFLE --online;;
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
29 fi
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
30 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
31 stop)
303
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
32 $0 offline
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
33 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
34 restart|force-reload)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
35 $0 start
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
36 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
37 *)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
38 echo "Usage: $0 {start|stop}" >&2
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
39 exit 1
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
40 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
41 esac
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
42
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
43 exit 0