Results 1 to 5 of 5
OS: Ubuntu Server 10.04.2 LTS
Hi, I have a problem, I have a script which need to be ran in a screen, automaticly at startup (SRCDS Spesificly).
What I've done:
...
- 06-09-2011 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 6
Run script in screen at startup
OS: Ubuntu Server 10.04.2 LTS
Hi, I have a problem, I have a script which need to be ran in a screen, automaticly at startup (SRCDS Spesificly).
What I've done:
Ive placed a boot.sh script in init.d:
startup.sh:Code:sh /home/xinity/eXtremeServer/startup.sh
Code:cd /home/xinity/eXtremeServer screen -S Sandbox ./orangebox/StartServer.sh
Ran update-rc.dCode:cd /home/xinity/eXtremeServer/orangebox/ #cp -v ./srcds_run_cp ./srcds_run #chmod -v +x ./srcds_run ./srcds_run -console -game garrysmod +hostport 27016 +tv_port 27021 +maxplayers 16 +map gm_construct -autoupdate -insecure -consolelog ./conlog.txt -timeout 1 -ignoresigint
What is wrong/happens:
The server will run, I can connect to it, and see its process in top (running as root though). But it will not appear in the screen -ls list. And I cannot attach to it, therefor I have no way to manage my screen/server.
Is there any other way to execute scripts at startup? I remember when I ran Ubuntu Desktop, I managed to run it by the program Startup Manager. There has to be an nongui way to do this?
Thanks for any answer
- 06-09-2011 #2Linux Guru
- Join Date
- May 2011
- Posts
- 1,855
Have you tried detaching the screen?
You mention "running as root" - is it not supposed to run as root? Anyway, whomever is the user that calls screen is the one that controls the screen, so "screen -ls" will only work as that user that started the screen.Code:screen -S Sandbox -d -m ./orangebox/StartServer.sh
- 06-09-2011 #3Just Joined!
- Join Date
- Nov 2010
- Posts
- 6
- 06-09-2011 #4Linux Guru
- Join Date
- May 2011
- Posts
- 1,855
can you explain what you mean by the screen messing up, when root?As screen messes up when its ran under root. I tried sudo -u xinity, but then the server failed to run :/
also, what do you mean the server fails to run; because your main user simply can't run the server (permission problems, etc.) or b/c of the way you are invoking sudo? attach errors, if possible.
- 06-09-2011 #5Just Joined!
- Join Date
- Nov 2010
- Posts
- 6


Reply With Quote
