Maharaja Posted April 22, 2012 Report Share Posted April 22, 2012 hello i'm using cenos 6.2and now i wanne have a auto startupso when i put my computer onutserver will startup and run till i shutdown the pcso it need to startup with the boothope anyone can help meGreets Maharaja Link to comment Share on other sites More sharing options...
WLS Posted April 22, 2012 Report Share Posted April 22, 2012 Here is a start.Writing Shell Scripts Link to comment Share on other sites More sharing options...
mikeziri Posted May 17, 2012 Report Share Posted May 17, 2012 drop this into a new file created on /etc/init.d/for example /etc.init.d/utserversudo 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 INFOcase "$1" in'start') cd /var/opt/utorrent/ ./utserver -daemon ;;'stop') killall utserver ;;*) echo "Usage: $0 { start | stop }" ;;esacexit 0make it executable:sudo chmod +x /etc/init.d/utserverbe 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 defaultsto future remove:sudo update-rc.d -f utserver remove Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.