Find the answer to your Linux question:
Results 1 to 3 of 3
I’m hoping that someone can help me! For starters I'm pretty new to Linux as a whole... I'm running xubuntu 10.10 as a MMO game server... I need to run ...
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Location
    USA
    Posts
    2

    Autostartup & restart

    I’m hoping that someone can help me! For starters I'm pretty new to Linux as a whole...


    I'm running xubuntu 10.10 as a MMO game server... I need to run 2 .sh files that after the server starts up I need to open 2 Terminal windows and type (./auth.sh & ./world.sh)... what I want to do is two things:


    I want the server to restart everyday at 4am local.
    I want the server to automatically start the servers in visual mode.



    I can have Linux start up the game servers... but I cannot see the terminal windows, which I need to be able to type commands for the game.


    I would very much appreciate if someone could help me!


    Thank you for your time and help!

  2. #2
    Linux Newbie
    Join Date
    Dec 2009
    Posts
    241
    Hi,
    you probably still have a server with usual init scripts.

    You can create a file in the folder: /etc/init.d
    Here are all scripts for the startup stored.

    Here you have a general discription of the init scripts:Linux: How to write a System V init script to start, stop, and restart my own application or service
    You may also read:
    Cool Solutions: Creating Custom init Scripts

    Just your start looks like:
    Code:
    start() {
            initlog -c "echo -n Starting Game service"
            "./auth.sh & ./world.sh" &
    }
    I'm not sure about the quotes ... you should test the script before you add it into the startup list

  3. #3
    Linux Enthusiast Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    718
    To start the service, you can safely follow zomykillah's approach. If "auth.sh" and "world.sh" are interactive, you may want to start them with a terminal multiplexer like screen or dtach. With that you can re-attach to those terminals whenever you need to. See "man screen" or "man dtach" for more information.

Posting Permissions

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