GodsDead
October 1st, 2008, 04:40 PM
Hey, i have looked around to try and find an answer to this, but i cant!!
I have a ubuntu server, with Counter strike source server installed, and it gets REALLY annoying to type out this all the time
cd /mnt/sdb1/srcds/
sudo ./srcds_run -console -game cstrike +map breakfloor -maxplayers 16 -autoupdate
So im looking into creating a script, im quite fluent in PHP, but would much prefer to use natural terminal scripting to make things work =p
this is my script (created in windows using notepadd++) and saved Via a samba folder share to my /home/tom.
The file is called csss.sh
im not sure about file extensions i guessed to save it as .sh from srcds.com tutorial on installing a CSS server..
#!/bin/bash
echo "Starting Counter-Strike:Source Server"
sleep 1
screen -A -m -d -S css-server /mnt/sdb1/srcds/srcds_run -console -game cstrike +map breakfloor +maxplayers 16 -autoupdate
I have screen installed..
but i have even tryed just having it echo out! and this is the error that i get!
tom@spicy:~$ sudo ./csss.sh
sudo: unable to execute ./csss.sh: No such file or directory
or without sudo
tom@spicy:~$ ./csss.sh
-bash: ./csss.sh: /bin/bash^M: bad interpreter: No such file or directory
And, i have chmodded the file with this;
tom@spicy:~$ sudo chown -R tom ./csss.sh
tom@spicy:~$ sudo chmod -R 777 ./csss.sh
please help im so confused!
I have a ubuntu server, with Counter strike source server installed, and it gets REALLY annoying to type out this all the time
cd /mnt/sdb1/srcds/
sudo ./srcds_run -console -game cstrike +map breakfloor -maxplayers 16 -autoupdate
So im looking into creating a script, im quite fluent in PHP, but would much prefer to use natural terminal scripting to make things work =p
this is my script (created in windows using notepadd++) and saved Via a samba folder share to my /home/tom.
The file is called csss.sh
im not sure about file extensions i guessed to save it as .sh from srcds.com tutorial on installing a CSS server..
#!/bin/bash
echo "Starting Counter-Strike:Source Server"
sleep 1
screen -A -m -d -S css-server /mnt/sdb1/srcds/srcds_run -console -game cstrike +map breakfloor +maxplayers 16 -autoupdate
I have screen installed..
but i have even tryed just having it echo out! and this is the error that i get!
tom@spicy:~$ sudo ./csss.sh
sudo: unable to execute ./csss.sh: No such file or directory
or without sudo
tom@spicy:~$ ./csss.sh
-bash: ./csss.sh: /bin/bash^M: bad interpreter: No such file or directory
And, i have chmodded the file with this;
tom@spicy:~$ sudo chown -R tom ./csss.sh
tom@spicy:~$ sudo chmod -R 777 ./csss.sh
please help im so confused!