#!/sbin/runscript # # DESCRIPTION # # Startup init script for BackupPC on Gentoo` linux. # # Distributed with BackupPC version 2.1.1, released 13 Mar 2005. # # description: Starts and stops the BackupPC server # Copy to /etc/init.d and run 'rc-update add backuppc default' checkconfig() { if [ ! -f ${CONF_FILE} ] ; then error "No ${CONF_FILE} exists!" fi } start() { checkconfig || return 1 ebegin "Starting BackupPC" if [ -f /var/lib/backuppc/log/status.pl ]; then rm /var/lib/backuppc/log/status.pl fi start-stop-daemon --start --chuid ${USER} --user ${USER} --pidfile ${PID_FILE} --exec ${EXEC} -- ${EXEC_OPTIONS} eend $? } stop() { ebegin "Stopping BackupPC" start-stop-daemon --stop --pidfile ${PID_FILE} --name BackupPC eend $? }