IPFire-Seeder gebaut...
[ipfire-2.x.git] / src / initscripts / init.d / ipfireseeder
1 #!/bin/sh
2 ########################################################################
3 # Begin $rc_base/init.d/ipfireseeder
4 #
5 # Description : This is a script that starts the torrent-seeder on your
6 #                                                               local IPFire.
7 #
8 # Authors     : Michael Tremer (mitch@ipfire.org)
9 #
10 # Version     : 01.00
11 #
12 # Notes       :
13 #
14 ########################################################################
15
16 . /etc/sysconfig/rc
17 . ${rc_functions}
18
19 case "${1}" in
20         start)
21                 boot_mesg "Starting IPFire Seeder..."
22                 cd /var/log/seeder
23                 loadproc screen -dmS seeder /usr/bin/rtorrent /var/ipfire/seeder/*.torrent
24                 ;;
25
26         stop)
27                 boot_mesg "Stopping IPFire Seeder..."
28                 killproc /usr/bin/rtorrent
29                 ;;
30
31         reload)
32                 boot_mesg "Reloading IPFire Seeder..."
33                 reloadproc /usr/bin/rtorrent
34                 ;;
35
36         restart)
37                 ${0} stop
38                 sleep 1
39                 ${0} start
40                 ;;
41
42         status)
43                 statusproc /usr/bin/rtorrent
44                 ;;
45
46         *)
47                 echo "Usage: ${0} {start|stop|reload|restart|status}"
48                 exit 1
49                 ;;
50 esac
51
52 # End $rc_base/init.d/ipfireseeder