comparison debian/init @ 301:3b5b7f3fd71f noffle

[svn] initial debian/ upload
author godisch
date Fri, 14 Feb 2003 13:54:32 +0000
parents
children 399ccb5e641b
comparison
equal deleted inserted replaced
300:994e9ab2c24f 301:3b5b7f3fd71f
1 #!/bin/sh
2 # $Id: init 434 2003-02-14 13:54:32Z godisch $
3
4 PATH=/bin:/usr/bin:/sbin:/usr/sbin
5
6 NOFFLE=/usr/bin/noffle
7 if [ -x /usr/sbin/pppd ]; then
8 NOFFLE_FETCHMODE="ppp"
9 else
10 NOFFLE_FETCHMODE="cron"
11 fi
12 [ -f /etc/default/noffle ] && . /etc/default/noffle
13
14 [ -x "$NOFFLE" ] || exit 0
15
16 case "$1" in
17 start)
18 echo "Initializing offline news server: noffle."
19 [ "$NOFFLE_FETCHMODE" = ppp ] && $NOFFLE --offline
20 [ "$NOFFLE_FETCHMODE" = cron ] && $NOFFLE --online
21 ;;
22 stop)
23 echo "Stopping offline news server: noffle."
24 $NOFFLE --offline
25 ;;
26 online)
27 echo "Starting offline news server: noffle."
28 $NOFFLE --online
29 ;;
30 offline)
31 echo "Stopping offline news server: noffle."
32 $NOFFLE --offline
33 ;;
34 restart|force-reload)
35 $0 start
36 ;;
37 *)
38 echo "Usage: $0 {start|stop}" >&2
39 exit 1
40 ;;
41 esac
42
43 exit 0