aboutsummaryrefslogtreecommitdiffstats
path: root/main/backuppc/backuppc.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/backuppc/backuppc.initd')
-rw-r--r--main/backuppc/backuppc.initd43
1 files changed, 43 insertions, 0 deletions
diff --git a/main/backuppc/backuppc.initd b/main/backuppc/backuppc.initd
new file mode 100644
index 0000000000..eefdc92c7c
--- /dev/null
+++ b/main/backuppc/backuppc.initd
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+
+depend() {
+ after firewall modules
+}
+
+
+configure () {
+ chown $USER $BACKUPPC_LOGDIR
+ chmod a+x $BACKUPPC_BINDIR/*
+ test -x $BACKUPPC_BINDIR/$DAEMON || exit 0
+}
+
+start() {
+ ebegin "Starting $DAEMON"
+ start-stop-daemon --start --pidfile $BACKUPPC_LOGDIR/BackupPC.pid \
+ -c $USER --exec $BACKUPPC_BINDIR/$DAEMON -- -d
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping $DAEMON"
+ start-stop-daemon --stop --pidfile $BACKUPPC_LOGDIR/BackupPC.pid \
+ --retry 30 -x /usr/bin/perl
+ eend $?
+}
+
+restart () {
+ start-stop-daemon --stop --pidfile $BACKUPPC_LOGDIR/BackupPC.pid \
+ --retry 30 -x /usr/bin/perl
+ start-stop-daemon --start --pidfile $BACKUPPC_LOGDIR/BackupPC.pid \
+ -c $USER --exec $BACKUPPC_BINDIR/$DAEMON -- -d
+}
+
+reload () {
+ start-stop-daemon --stop --pidfile $BACKUPPC_LOGDIR/BackupPC.pid \
+ --signal 1 -x /usr/bin/perl
+}
+
+
+
+
+