As mentioned in a previous email, I had a problem getting backuppc to start or stay running when I first installed it. I found I had to ensure that the temp file location was created in in /var/run/BackupPC before starting the daemon. If backuppc uses a temp file location for your distro, I assume it does, then it will be needed to start the daemon, regardless whether you start it manually or form the init script.
You could look and see if you have a directory at /var/run/BackupPC
The
config.pl parameter below will tell you where this directory should be created:
$Conf{RunDir} = '/var/run/BackupPC';
If you don't have the correct directory, try creating it (of course customize this to your run dir location from
config.pl):
$ mkdir -p /var/run/BackupPC
$ chown [backuppc-user]:[backuppc-group] /var/run/BackupPC
Then try starting the daemon again.
I ended up adding a temp file system check to my init script for backuppc:
checkTempFs() {
if `test -d /var/run/BackupPC`; then
echo "BackupPC tempfs exisits"
else
mkdir -p /var/run/BackupPC
chown backuppc:backuppc /var/run/BackupPC
echo "BackupPC tempfs created"
fi
}
Then I I added the "checkTempFs()" function to the init script's "start" function:
start() {
# Make sure /var/run/BackupPC tempfs exisits
checkTempFs
echo -n "Starting BackupPC: "
daemon --user backuppc /usr/local/BackupPC/bin/BackupPC -d
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/backuppc || \
RETVAL=1
return $RETVAL
}
David