^
pyLoad installation done. Here are the steps
Code:
pacman -Sy python2 python-pycurl
Create a symbolic link for python to python2
Code:
ln -s /usr/bin/python2 /usr/bin/python
Download and extract the pyLoad source package
Code:
wget [url]http://download.pyload.org/pyload-src-v0.4.8.zip[/url]
unzip pyload-src-v0.4.8.zip
Go to the folder in which pyLoad was extracted and run
Set the download path and login data etc. When it asks for type of webserver, choose 'threaded'
Now create a file /etc/rc.d/pyLoadCored and add the following
Code:
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
USER=root
PIDFILE=/home/$USER/.pyload/pyload.pid
case "$1" in
start)
stat_busy "Starting pyLoadCore"
su $USER -c '/usr/bin/pyLoadCore --daemon' &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon pyLoadCored
stat_done
fi
;;
stop)
stat_busy "Stopping pyLoadCore"
# killall -w -s 2 /usr/bin/pyLoadCore &> /dev/null
su $USER -c "kill -15 $(cat $PIDFILE) && rm -f $PIDFILE" &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon pyLoadCored
stat_done
fi
;;
restart)
$0 stop
sleep 3
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
Make it executable
Code:
chmod +x /etc/rc.d/pyLoadCored
If you extracted the pyload files to /home/pyload then run the following command
Code:
ln -s /home/pyload/pyLoadCore.py /usr/bin/pyLoadCore
After that edit /etc/rc.conf and in the last line which says 'Daemons' append 'pyLoadCored'. Here is mine as an example
Code:
DAEMONS=(set-oxnas-mac !hwclock syslog-ng network netfs crond sshd openntpd webmin transmissiond samba pyLoadCored)