annotate debian/init @ 362:c036f2b55576 noffle

[svn] cleanup
author godisch
date Sat, 29 Mar 2003 07:14:12 +0000
parents 8f8db12ae359
children 82457f16cf43
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
341
8f8db12ae359 [svn] minor cleanup
godisch
parents: 337
diff changeset
2 # $Id: init 477 2003-03-04 22:16:42Z 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
341
8f8db12ae359 [svn] minor cleanup
godisch
parents: 337
diff changeset
12 [ -f /etc/default/noffle ] && . /etc/default/noffle || :
301
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."
334
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
23 if [ "$NOFFLE_FETCHMODE" = ppp ]; then
337
1aa1ed030464 [svn] cleanup bugfix
godisch
parents: 334
diff changeset
24 $NOFFLE --offline
334
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
25 else
337
1aa1ed030464 [svn] cleanup bugfix
godisch
parents: 334
diff changeset
26 $NOFFLE --online
334
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
27 fi
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
28 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
29 stop)
303
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
30 $0 offline
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
31 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
32 restart|force-reload)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
33 $0 start
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
34 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
35 *)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
36 echo "Usage: $0 {start|stop}" >&2
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
37 exit 1
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
38 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
39 esac
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
40
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
41 exit 0