Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 2 of 2

This is a discussion on Creating A Service On Linux in the VPS & Dedicated forum
I just got my new VPS set up and its absolutely awesome! I am currently testing a game server on this box to see how ...

  1. #1
    Loyal Client Pawel Kowalski's Avatar
    Join Date
    Sep 2001
    Location
    Albuquerque NM
    Posts
    1,405

    Creating A Service On Linux

    I just got my new VPS set up and its absolutely awesome! I am currently testing a game server on this box to see how it will run, however, my main function will be web site hosting.

    I got the server set up just fine but when I disconnect from SSH it kills the game server process. So I got this script to start the server, how can I make this script execure on boot instead of having to activate it using SSH every time?

    start.sh:

    Code:
    echo “Starting Server”
    echo “cd ..”
    echo “cd ..”
    echo “cd /home/*user*/”
    echo “sh start.sh”
    screen -A -m -d -S servername /home/*user*/srcds_run -console -cstrike +map de_dust2 +maxplayers 26 -autoupdate -IP xxx.xxx.xxx.xxx -port 27015 +fps_max 200 -tickrate 66 -pingboost 3
    echo “Server Starting…”
    echo “Parameters srcds_run -console -cstrike +map de_dust2 +maxplayers 26 -autoupdate -IP xxx.xxx.xxx.xxx -port 27015 +fps_max 200 -tickrate 66 -pingboost 3″
    echo “…Server Started”

  2. #2
    || $name ne 'R.Stiltskin'
    Join Date
    Jun 2003
    Location
    Tejas
    Posts
    2,438
    Do you have an rc.local or something similar in your /etc/ directory among all of the rc.x files? If you do, then you should be able to enter a line to call your bash script from that user configuration startup file.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •