5 # Startup init script for BackupPC on Debian.
7 # Distributed with BackupPC version __VERSION__, released __RELEASEDATE__.
13 BINDIR=__INSTALLDIR__/bin
20 test -x $BINDIR/$DAEMON || exit 0
24 echo -n "Starting $NAME: "
25 start-stop-daemon --start --pidfile $DATADIR/log/BackupPC.pid \
26 -c $USER --exec $BINDIR/$DAEMON -- -d
30 echo -n "Stopping $NAME: "
31 start-stop-daemon --stop --pidfile $DATADIR/log/BackupPC.pid -u $USER \
32 --oknodo --retry 30 -x /usr/bin/perl
36 echo -n "Restarting $NAME: "
37 start-stop-daemon --stop --pidfile $DATADIR/log/BackupPC.pid -u $USER \
38 --oknodo --retry 30 -x /usr/bin/perl
39 start-stop-daemon --start --pidfile $DATADIR/log/BackupPC.pid \
40 -c $USER --exec $BINDIR/$DAEMON -- -d
44 echo "Reloading $NAME configuration files"
45 start-stop-daemon --stop --pidfile $DATADIR/log/BackupPC.pid \
46 --signal 1 -x /usr/bin/perl
49 echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload}"