I have a startup script placed in /etc/init.d wherein I make the following call:
nohup sudo -u myuser $CATALINA_HOME/bin/startup.sh 2>&1
This causes Tomcat to be run as myuser, which is expected. However after issuing the reboot command the system starts up and root is now the owner of this process. How can I force the process to be started off as myuser on reboot?