Page 1 of 1

Deleted /etc/default/sabnzbdplus config file

Posted: March 17th, 2011, 1:57 am
by elproducto
I had not used Sab in a while and had upgraded Ubuntu an noticed Sab was not starting automatically.  I deleted the config file at /etc/default/sabnzbdplus  :-[.  I wanted to know how I can get this file back.  Would I have to uninstall and reinstall or can I get a copy of the file somewhere?  Not sure how the setting are getting retained without it.

Re: Deleted /etc/default/sabnzbdplus config file

Posted: March 17th, 2011, 2:58 am
by jcfp
It's available here, on debian's svn. Reinstall probably also works to get it back.

Without the settings file the service never starts, because the init script never gets past the sanity check:

Code: Select all

DAEMON=/usr/bin/sabnzbdplus
SETTINGS=/etc/default/sabnzbdplus

([ -x $DAEMON ] && [ -r $SETTINGS ]) || exit 0
;D

Re: Deleted /etc/default/sabnzbdplus config file

Posted: March 17th, 2011, 12:35 pm
by elproducto
Thanks for the file location.  The weird thing is I can start Sab with command line "sabnzbdplus".

Re: Deleted /etc/default/sabnzbdplus config file

Posted: March 17th, 2011, 1:09 pm
by jcfp
The program (= sabnzbdplus command) is unaware of how its started, be it "manually" on the command line or from an init script. Its configuration file (sabnzbd.ini) gets stored in the home dir of the user running it. The program will simply create a fresh config file (and show you the wizard on startup, etc.) if it doesn't find an existing one.

The file you deleted on the other hand (/etc/default/sabnzbdplus) is the config file for the init script (/etc/init.d/sabnzbdplus). Simply put: that init script -which is run by the root user on system startup- needs to know which user to run the application as. So if its config is missing or not filled out yet, it won't start the service.