Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question Startup a sh file a normal user on boot


    Sorry to a such a noob but I very new to the Linux seen (Very New)

    What I have got is an Arch Linux installation

    I would like to run a sh file that is in the


    Folder on boot

    This server will be visible over the internet and I donít want someone to be able to hack it and get root admin on my server so I would like to run the file as a normal user

    Go easy on the noob


    If you need more info just ask

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA
    You can add a script to /etc/rc.d/ that will start up Minecraft (more on this in a moment). Look at other files in /etc/rc.d for an idea of how they work. You'll then have to add the script to the DAEMONS array in /etc/rc.conf.

    The Minecraft start script should, on start, run the command "sudo -u minecraft /path/to/script" (or "su -u minecraft - c /path/to/script", whichever you use). This will run the script as the given user (in this case, minecraft).

  3. #3
    Add the script to /etc/rc.local/
    rc.local is for bash scripts and rc.d is for Daemons

  4. $spacer_open

Posting Permissions

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