view debian/init @ 371:82457f16cf43 noffle

[svn] fixed policy compliance
author godisch
date Wed, 02 Apr 2003 12:05:33 +0100
parents 8f8db12ae359
children 62b17f6d0269
line wrap: on
line source

#!/bin/sh
# $Id: init 511 2003-04-02 11:05:33Z godisch $

set -e
NOFFLE=/usr/bin/noffle
[ -x "$NOFFLE" ] || exit 0

if [ -x /usr/sbin/pppd ]; then
	NOFFLE_FETCHMODE="ppp"
else
	NOFFLE_FETCHMODE="cron"
fi
if [ -f /etc/default/noffle ]; then
	. /etc/default/noffle
fi

case "$1" in
online|offline)
	echo "Switching offline news server to $1 mode: noffle."
	$NOFFLE --$1
	;;
start)
	echo "Initializing offline news server: noffle."
	if [ "$NOFFLE_FETCHMODE" = ppp ]; then
		$NOFFLE --offline
	else
		$NOFFLE --online
	fi
	;;
stop)
	$0 offline
	;;
reload|force-reload|restart)
	;;
*)
	echo "Usage: $0 {start|stop|online|offline}" >&2
	exit 1
	;;
esac

exit 0