You are not logged in.
Pages: 1
I'm having trouble getting the sabnzbd daemon script to run. I'm trying to run the default one that came with the AUR but it keeps failing while running it from /opt/sabnzbd/SABnzbd.py works. Yes, I have copied over the ini file to /opt/sabnzbd/. Below is the /etc/rc.d/sabnzbd shell script. I'm a real newbie so I don't really know how to troubleshoot what's going on at all . It just says [FAIL] dies.
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
SABNZBD_USER="sabnzbd"
SABNZBD_CONF="/opt/sabnzbd/sabnzbd.ini"
PID=`pidof -o %PPID -x SABnzbd.py`
case "$1" in
start)
stat_busy "Starting SABnzbd"
[ -z "$PID" ] && su - $SABNZBD_USER -c "/opt/sabnzbd/SABnzbd.py -f $SABNZBD_CONF -d" -s /bin/sh
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon sabnzbd
stat_done
fi
;;
stop)
stat_busy "Stopping SABnzbd"
[ "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon sabnzbd
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
Last edited by DONDON (2008-12-23 02:30:02)
Offline
i have copied all the configuration to ~/.sabnzbd and so i changed the SABNZBD_USER to my username en SABNZBD_CONF to "/home/vincent/sabnzbd/sabnzbd.ini"
Offline
Thanks for the quick reply. Unfortunately, changing the script to SABNZBD_USER="dondon" and SABNZBD_CONF="/home/dondon/.sabnzbd/sabnzbd.ini" didn't help.
Offline
After a long time playing with it I set my directories in /opt/sabnzbd/sabnzbd.ini to not include ~/ but just /home/dondon/.sabnzbd/logs and I've made progress, but now I'm getting this error:
Error:
I refuse to fork without a log directory!
[DONE]
This directory exists and can be written to by any user... so I'm still confused .
Last edited by DONDON (2008-12-23 00:48:38)
Offline
So, I figured it out. I removed every file that was associated with SABnzbd and started over. Below are a list of things that I learned on my way that I hope will help other true newbies get their daemons working:
1. Write your access rules so that the user your daemon runs under is in the same group as your user account if you've manually made your download/incomplete/cache/log folders.
2. Make sure to not use ~/ to designate your home directory with the SABnzbd config file. Instead use /home/usernamehere/
3. When you move sabnzbd.ini over to /opt/sabnzbd/ chown it back to the user designated in the /etc/rc.d/sabnzbd script
4. When you chown the a file make sure you're changing the group AND owner.
5. ls -al is your friend.
6. If your config file gets too messy, just remove it and start over.
These are all really newbie mistakes that I made. I hope they help someone else avoid them .
Offline
Pages: 1