Page 1 of 1
Ignores Settings in /etc/default/sabnzbdplus
Posted: September 6th, 2012, 9:44 am
by fuqu
I set USER=nzb in "/etc/default/sabnzbdplus" on my debian server.
When I boot the system now, sabnzbd doesnt print an error message but also does not start properbly.
If I start "sabnzbplus -d" the sabnzbd starts successfully but is run by user root and not user nzb.
If I switch to user nzb and start "sabnzbdplus -d" it runs by user nzb without problems. Same as when am logged in as root and do "sudo -u nzb sabnzbdplus -d" - everything works fine.
But I doesnt get the autostart with user nzb to work :-( Any ideas? Thank you

Re: Ignores Settings in /etc/default/sabnzbdplus
Posted: September 6th, 2012, 2:02 pm
by jcfp
First, if you want to test the init script just call it directly, i.e. sudo /etc/init.d/sabnzbdplus start or even sudo sh -x /etc/init.d/sabnzbdplus start for debug output.
Next, check that everything sab needs is actually available on time. Known troublemakers include encrypted home dirs, (wireless) network connection that are slow to come up, and usb disks.
Re: Ignores Settings in /etc/default/sabnzbdplus
Posted: September 7th, 2012, 5:19 am
by fuqu
so i did "sh -x /etc/init.d/sabnzbdplus start" and it works fine.
but at boot it still doesnt start.
I dont have any encrypted dirs, no wifi, no usb drives.
maybe i will just start the sab by hand as the system is usually not shut down anyways.
root@server:/# sh -x /etc/init.d/sabnzbdplus start
+ DAEMON=/usr/bin/sabnzbdplus
+ SETTINGS=/etc/default/sabnzbdplus
+ [ -x /usr/bin/sabnzbdplus ]
+ [ -r /etc/default/sabnzbdplus ]
+ DESC=SABnzbd+ binary newsgrabber
+ DEFOPTS=--daemon
+ sed -n 1s/^#\!\([a-z0-9\.\/]\+\)\(.*\)/\1(\2)?/p /usr/bin/sabnzbdplus
+ PYTHONEXEC=^/usr/bin/python( -OO)?
+ PIDFILE=/var/run/sabnzbdplus.pid
+ SETTINGS_LOADED=FALSE
+ unset USER CONFIG HOST PORT EXTRAOPTS
+ . /lib/lsb/init-functions
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ true
+ start_sab
+ load_settings
+ [ FALSE != TRUE ]
+ . /etc/default/sabnzbdplus
+ USER=nzb
+ CONFIG=
+ HOST=192.168.1.5
+ PORT=8080
+ EXTRAOPTS=
+ [ -z nzb ]
+ OPTIONS=--daemon
+ [ -n ]
+ [ -n 192.168.1.5 ]
+ SERVER=192.168.1.5
+ [ -n 8080 ]
+ SERVER=192.168.1.5:8080
+ [ -n 192.168.1.5:8080 ]
+ OPTIONS=--daemon --server 192.168.1.5:8080
+ [ -n ]
+ SETTINGS_LOADED=TRUE
+ return 0
+ is_running
+ pgrep -f -x -u nzb ^/usr/bin/python( -OO)? /usr/bin/sabnzbdplus --daemon.*
+ PID=
+ RET=1
+ [ 1 -gt 1 ]
+ return 1
+ log_daemon_msg Starting SABnzbd+ binary newsgrabber
+ [ -z Starting SABnzbd+ binary newsgrabber ]
+ log_daemon_msg_pre Starting SABnzbd+ binary newsgrabber
+ :
+ [ -z ]
+ echo -n Starting SABnzbd+ binary newsgrabber:
Starting SABnzbd+ binary newsgrabber:+ return
+ start-stop-daemon --quiet --chuid nzb --start --exec /usr/bin/sabnzbdplus -- - -daemon --server 192.168.1.5:8080
+ check_retval
+ [ 0 -eq 0 ]
+ log_end_msg 0
+ [ -z 0 ]
+ retval=0
+ log_end_msg_pre 0
+ :
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ [ -t 1 ]
+ [ xxterm != x ]
+ [ xxterm != xdumb ]
+ [ -x /usr/bin/tput ]
+ [ -x /usr/bin/expr ]
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ [ -z ]
+ FANCYTTY=1
+ true
+ /usr/bin/tput setaf 1
+ RED=
+ /usr/bin/tput setaf 3
+ YELLOW=
+ /usr/bin/tput op
+ NORMAL=
+ [ 0 -eq 0 ]
+ echo .
.
+ log_end_msg_post 0
+ :
+ return 0
+ return 0
+ dirname /var/run/sabnzbdplus.pid
+ [ -w /var/run ]
+ pgrep -f -x -n -u nzb ^/usr/bin/python( -OO)? /usr/bin/sabnzbdplus --daemon -- server 192.168.1.5:8080
+ exit 0
Re: Ignores Settings in /etc/default/sabnzbdplus
Posted: September 7th, 2012, 6:56 am
by jcfp
Looks fine indeed. What if you change the HOST setting from 192.168.1.5 to 0.0.0.0 ? (listens on all interfaces)
Re: Ignores Settings in /etc/default/sabnzbdplus
Posted: September 7th, 2012, 11:33 am
by fuqu
-.-
sometimes it is so obviously that I dont see it. the links in the runlevel folders were missing.
thanks for your help
