To start off please use code tags for your posted scripts, second all init scripts are run as root, if you want to run a command in a script a a particular user try using su to run the command, many deamons allow being run as a particular user, ( appache for instance ) but see the relevent man pages, or you can run the script when the user logs in by placing it in ~/.bash_profile, or if worze comes to worse just get the init script to call the real script as a specific usr again you will probably have to use su.
|