3 # Start/stop/restart script for CBTT, the C++ BitTorrent tracker
4 # Unfortunately, since the tracker's binary itself is written to output
5 # data to terminal by default (and there's no known way to override this,
6 # at least to me), we have to use dtach, what results in some quite
7 # unnecessary checking whether the server is actually running or not.
8 # If somebody has a better idea on how to do this, please contact me.
14 stat_busy
"Starting CBTT"
15 if [ -e /home
/tracker
/bnbtconsole
];
17 rm -f /home
/tracker
/bnbtconsole
19 if [ ! -z `pidof bnbt` ];
23 su
- -c "dtach -n bnbtconsole /home/tracker/bnbt" tracker
24 if [ -z `pidof bnbt` ];
34 stat_busy
"Stopping CBTT"
35 if [ -z `pidof bnbt` ];
49 echo "Usage : $0 {start|stop|restart}"