1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
#! /bin/sh
### BEGIN INIT INFO
# Provides: netplan
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Netplan calendar service.
# Description: The server part of plan.
### END INIT INFO
# Set ENABLED=0 to disable, ENABLED=1 to enable.
ENABLED=0
DAEMON=/usr/sbin/netplan
DAEMONOPTS=-s
PATH=/bin:/usr/bin:/sbin:/usr/sbin
# Load local overrides
if [ -f /etc/default/netplan ] ; then
. /etc/default/netplan
fi
test -f $DAEMON || exit 0
if [ "$ENABLED" = 0 ]
then
echo "Netplan daemon not enabled in /etc/init.d/netplan."
exit 0
fi
case "$1" in
start)
echo -n "Starting plan appointment daemon: netplan"
start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMONOPTS
echo "."
;;
stop)
echo -n "Stopping plan appointment daemon: netplan"
start-stop-daemon --stop --quiet --exec $DAEMON -- $DAEMONOPTS
echo "."
;;
restart | force-reload)
echo -n "Stopping plan appointment daemon: netplan"
start-stop-daemon --stop --quiet --exec $DAEMON -- $DAEMONOPTS
echo "."
echo -n "Restarting plan appointment daemon: netplan"
start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMONOPTS
echo "."
;;
*)
echo "Usage: /etc/init.d/plan {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
|