Ya here you go; following code should work...
Code:
echo css server management--Please choose a server.
echo cssource [0]
echo cssource [1]
echo cssource [2]
echo cssource [3]
echo cssource [4]
echo cssource [5]
echo cssource [6]
echo cssource [7]
echo cssource [8]
echo cssource [9]
echo cssource [10]
echo cssource [11]
echo cssource [12]
#store vars
read choice
if [ $choice -eq 0 ] ; then cd /home/sparky/backup
elif [ $choice -eq 1 ] ; then cd /home/server01
elif [ $choice -eq 2 ] ; then cd /home/server02
elif [ $choice -eq 3 ] ; then cd /home/server03
elif [ $choice -eq 4 ] ; then cd /home/server04
elif [ $choice -eq 5 ] ; then cd /home/server05
elif [ $choice -eq 6 ] ; then cd /home/server06
elif [ $choice -eq 7 ] ; then cd /home/server07
elif [ $choice -eq 8 ] ; then cd /home/server08
elif [ $choice -eq 9 ] ; then cd /home/server09
elif [ $choice -eq 10 ] ; then cd /home/server10
elif [ $choice -eq 11 ] ; then cd /home/server11
elif [ $choice -eq 12 ] ; then cd /home/server12
else exit
fi
#server options.
echo please fill in these 3 questions and ill start your server
#Enter port
echo -n Please enter port you wish to use :
read port
#tick
echo -n Please enter server tick rate :
read tick
#Max players
echo -n Please enter max players :
read players
./srcds_run -game cstrike -port $port +ip194.105.134.151 +maxplayers $players -tickrate $tick +map de_dust +exec server.cfg -autoupdate &
And what was wrong ... Line
Code:
elif [ $choice -eq 1] ; then cd /home/server01
Should be
Code:
elif [ $choice -eq 1 ] ; then cd /home/server01
There should be space between 1 and ] so i just added a blank space for rest of all elif statements... just use above (copy and paste)
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!
If you have knowledge, let others light their candles at it.
Certified to work on
HP-UX /
Sun Solaris /
RedHat