X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=init.d%2Fsrc%2Fslackware-backuppc;fp=init.d%2Fsrc%2Fslackware-backuppc;h=49cd4e7faf7cb821c18da5d587f19310e49185e7;hp=0000000000000000000000000000000000000000;hb=fad8dd470868fb4db332cb8214852783e8c6e75b;hpb=d13d57e035dac9362ca393991b978530402969b7 diff --git a/init.d/src/slackware-backuppc b/init.d/src/slackware-backuppc new file mode 100755 index 0000000..49cd4e7 --- /dev/null +++ b/init.d/src/slackware-backuppc @@ -0,0 +1,56 @@ +#!/bin/sh +# +# DESCRIPTION +# +# Startup init script for BackupPC for Slackware. +# +# Distributed with BackupPC version __VERSION__, released __RELEASEDATE__. +# +# Provided by Tony Nelson. +# + +start() { + # + # You can set the SMB share password here is you wish. Otherwise + # you should put it in the config.pl script. + # If you put it here make sure this file has no read permissions + # for normal users! See the documentation for more information. + # + #BPC_SMB_PASSWD= + #export BPC_SMB_PASSWD + # + su backuppc -c "__INSTALLDIR__/bin/BackupPC -d" +} + +stop() { + /usr/bin/pkill -f "__INSTALLDIR__/bin/BackupPC -d" +} + +restart() { + stop + start +} + +reload() { + /usr/bin/pkill -1 -f "__INSTALLDIR__/bin/BackupPC -d" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac + +exit $?