annotate debian/init @ 301:3b5b7f3fd71f noffle

[svn] initial debian/ upload
author godisch
date Fri, 14 Feb 2003 13:54:32 +0000
parents
children 399ccb5e641b
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
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
2 # $Id: init 434 2003-02-14 13:54:32Z godisch $
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
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
17 start)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
18 echo "Initializing offline news server: noffle."
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
19 [ "$NOFFLE_FETCHMODE" = ppp ] && $NOFFLE --offline
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
20 [ "$NOFFLE_FETCHMODE" = cron ] && $NOFFLE --online
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
21 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
22 stop)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
23 echo "Stopping offline news server: noffle."
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
24 $NOFFLE --offline
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
25 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
26 online)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
27 echo "Starting offline news server: noffle."
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
28 $NOFFLE --online
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
29 ;;
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
30 offline)
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
31 echo "Stopping offline news server: noffle."
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
32 $NOFFLE --offline
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