I'm developing a debian package that should start up a backup service as the root user. All works fine when I install it from the command line e.g. sudo dpkg -i xxx.deb but when I install this by clicking the .deb file on the desktop the service won't start up.
Below is an extract from my init script:
BACKUP_USER=root
#
# Starts the attix5 daemon
#
do_start()
{
start-stop-daemon --start --quiet --oknodo --chuid $BACKUP_USER --chdir /usr/share/a5backup \
--pidfile $PIDFILE --startas $sStartScript -- start
}
...
# Perform action
case "$1" in
start)
log_daemon_msg "Starting $sName service"
if do_start ; then
log_end_msg 0
else
log_end_msg 1
fi
;;
Is there something special I must do before the service can be started up as root when the deb file is installed via the GUI.