| Server IP : 134.236.49.22 / Your IP : 216.73.216.114 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /etc/rc5.d/ |
Upload File : |
#!/bin/bash
#
# chkconfig: - 16 84
# description: Start up seed clients for BitTorrent
#
# processname: btseed
# config: /etc/sysconfig/bittorrent
# source function library
. /etc/rc.d/init.d/functions
# Get network config
#. /etc/sysconfig/network
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
# default directory for torrents to seed
SEEDDIR=/var/lib/bittorrent/data
# default log file
SEEDLOG=/var/log/btseed.log
# source the config
. /etc/sysconfig/bittorrent
RETVAL=0
prog="/usr/bin/btseed"
btuser="torrent"
btgroup="torrent"
case "$1" in
start)
echo -n $"Starting BitTorrent seed client: "
/sbin/runuser -s /bin/sh -c "$prog $SEEDOPTS $SEEDDIR" $btuser >> $SEEDLOG 2>&1 &
disown -ar
/bin/usleep 500000
status btseed &> /dev/null && echo_success || echo_failure
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
/bin/touch /var/lock/subsys/btseed
/sbin/pidof -o %PPID -x btseed > /var/run/btseed.pid
fi
echo
;;
stop)
echo -n $"Shutting down BitTorrent seed client: "
killproc $prog
RETVAL=$?
[ $RETVAL -eq 0 ] && /bin/rm -f /var/lock/subsys/btseed /var/run/btseed.pid
echo
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/btseed ]; then
$0 stop
$0 start
fi
RETVAL=$?
;;
status)
status btseed
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
exit 1
esac
exit $RETVAL