start server on boot

Discussion in 'Bukkit Help' started by blaize9, Oct 21, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    blaize9

    Well i am using rtoolkit as a server wrapper, and byobu (like screen) i was wondering how do i make it so it will start the server on boot.
    Currently i placed rtoolkit in etc/init.d
    and i am using the following commands to link it so it will start on startup and stop on shutdown

    Code:
    ln -s /etc/init.d/rtoolkit  /etc/rc5.d/S50rtoolkit
    ln -s /etc/init.d/rtoolkit  /etc/rc5.d/K50rtoolkit
     
  2. Offline

    blaize9

    Bump? any one??
     
  3. Offline

    c0mp

    Ewww, that would run your server as root (without some additional modification). Not good.

    An easier way is to log into the computer as a regular user, then run:

    Code:
    crontab -e
    This will open your user's crontab. Then just type the following on a new line:

    Code:
    @reboot YourMinecraftStartupCommand(s)
    So for example, my line is:

    Code:
    @reboot /home/USER/bin/minecraft start
    Which calls a script called 'minecraft' located in /home/USER/bin, and passes the 'start' argument to the script.

    You can also add the startup command to your /home/USER/.bash_profile file and it will run as soon as that user logs in.
     
    shadrxninga likes this.
  4. Offline

    blaize9

    Thanks for the info, well normally i login in and run it manually on my other account(not on root)
     
  5. Offline

    Darq

    You can have it in /etc/init.d and have it not run as root. You just specify in the script itself.
     
  6. Offline

    drdanick

    @Darq is correct. Considering the scripts in init.d are run as root, you can have it switch to any given user before executing a particular command.
     
  7. Offline

    c0mp

    You're right, I prostrate myself before yous guys and beg of your forgivenesses. My post has been updated with more accurate info.
     
Thread Status:
Not open for further replies.

Share This Page