Results 1 to 3 of 3
Hay Sorry to a such a noob but I very new to the Linux seen (Very New) What I have got is an Arch Linux 18.104.22.168 installation I would like ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-19-2011 #1
- Join Date
- Dec 2011
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 22.214.171.124 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
- 12-19-2011 #2
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).
- 01-15-2012 #3
- Join Date
- Aug 2010
Add the script to /etc/rc.local/
rc.local is for bash scripts and rc.d is for Daemons