LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Startup Scripts (https://www.linuxquestions.org/questions/linux-newbie-8/startup-scripts-403746/)

Mulsiphix 01-15-2006 05:54 PM

Startup Scripts
 
I am going to be running a game server on a dedicated server I am renting. It is running Debian (Sarge) and I would like to set my server to startup automatically after rebooting the machine. I was told I want to make sure it runs on an unprivaledged user but I am not sure what that means and I have no idea how to set this to startup automatically. Could anybody tell me how I would tell Linux to run /usr/games/ut/launchit upon boot on an unprivaledged user?

gilead 01-15-2006 06:11 PM

If the username you want to use is games, then put the following in your startup scripts:

Code:

su - games -c /usr/games/ut/launchit
I don't know where Debian keeps its startup stuff - have a look for one of the following:

Code:

/etc/rc.d/rc.local
/etc/init.d/boot.local
/etc/rc.d/init.d/rc.local

If the game requires specific environment variables you may need to modify /usr/games/ut/launchit or create a wrapper script that sets the variables before launching /usr/games/ut/launchit.

anggoro 01-15-2006 10:26 PM

Quote:

Originally Posted by gilead
I don't know where Debian keeps its startup stuff

Debian uses runlevel 2.

alternative:

U can add script program at /etc/bashrc or xsession (eg /home/user/.xsession) and add your games appliation at the bottom line, remember to add & at the end of command


All times are GMT -5. The time now is 07:51 AM.