annotate debian/init @ 371:82457f16cf43 noffle

[svn] fixed policy compliance
author godisch
date Wed, 02 Apr 2003 12:05:33 +0100
parents 8f8db12ae359
children 62b17f6d0269
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
371
82457f16cf43 [svn] fixed policy compliance
godisch
parents: 341
diff changeset
2 # $Id: init 511 2003-04-02 11:05:33Z godisch $
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
3
371
82457f16cf43 [svn] fixed policy compliance
godisch
parents: 341
diff changeset
4 set -e
82457f16cf43 [svn] fixed policy compliance
godisch
parents: 341
diff changeset
5 NOFFLE=/usr/bin/noffle
82457f16cf43 [svn] fixed policy compliance
godisch
parents: 341
diff changeset
6 [ -x "$NOFFLE" ] || exit 0
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
7
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
8 if [ -x /usr/sbin/pppd ]; then
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
9 NOFFLE_FETCHMODE="ppp"
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
10 else
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
11 NOFFLE_FETCHMODE="cron"
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
12 fi
371
82457f16cf43 [svn] fixed policy compliance
godisch
parents: 341
diff changeset
13 if [ -f /etc/default/noffle ]; then
82457f16cf43 [svn] fixed policy compliance
godisch
parents: 341
diff changeset
14 . /etc/default/noffle
82457f16cf43 [svn] fixed policy compliance
godisch
parents: 341
diff changeset
15 fi
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
16
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
17 case "$1" in
303
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
18 online|offline)
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
19 echo "Switching offline news server to $1 mode: noffle."
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
20 $NOFFLE --$1
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
21 ;;
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
22 start)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
23 echo "Initializing offline news server: noffle."
334
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
24 if [ "$NOFFLE_FETCHMODE" = ppp ]; then
337
1aa1ed030464 [svn] cleanup bugfix
godisch
parents: 334
diff changeset
25 $NOFFLE --offline
334
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
26 else
337
1aa1ed030464 [svn] cleanup bugfix
godisch
parents: 334
diff changeset
27 $NOFFLE --online
334
08222dbe6eb0 [svn] cleanup
godisch
parents: 303
diff changeset
28 fi
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
29 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
30 stop)
303
399ccb5e641b [svn] clarified init output
godisch
parents: 301
diff changeset
31 $0 offline
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
32 ;;
371
82457f16cf43 [svn] fixed policy compliance
godisch
parents: 341
diff changeset
33 reload|force-reload|restart)
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
34 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
35 *)
371
82457f16cf43 [svn] fixed policy compliance
godisch
parents: 341
diff changeset
36 echo "Usage: $0 {start|stop|online|offline}" >&2
301
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