Jump to content

Startup on boot (not logging in)


Maharaja

Recommended Posts

  • 4 weeks later...

drop this into a new file created on /etc/init.d/

for example /etc.init.d/utserver

sudo nano /etc/init.d/utserver:

#!/bin/sh
### BEGIN INIT INFO
# Provides: utserver
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 5
# Description: utorrent server
### END INIT INFO

case "$1" in
'start')
cd /var/opt/utorrent/
./utserver -daemon
;;
'stop')
killall utserver
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0

make it executable:

sudo chmod +x /etc/init.d/utserver

be sure to change your server location (binaries of utserver). mine is on /var/opt/utorrent/

EDIT: forgot the boot script:

to add to boot:

sudo update-rc.d utserver defaults

to future remove:

sudo update-rc.d -f utserver remove

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...