Start program under unprivileged user with init

Seperation from the root user is always a smart thing to do. Here is a small init script i made to do exactly this.

Compatible with: Ubuntu servers.
Git repo: https://github.com/GeekintheMiddle/SysadminScripts.git

How to install
git clone https://github.com/GeekintheMiddle/SysadminScripts.git
cd SysadminScripts
cp init_script /etc/init.d/{scriptname}
chmod +x /etc/init.d/{scriptname}


Open the new init script and change the following variables:
{script_name}
{username}
{script_location}


To add the script to the startup use the command:
update-rc.d {init script name} defaults

There is really not more to it. Of course you can tweak the file to add extra parameters and functions.