We have an application and to get that started we need to do steps each time the server gets security patches. I wonder if it is possible to start the application automatic each time the server boots.
Currently we are doing this: Login in to the server with putty sudo su - user
Now is the tricky point, during this "sudo su - user", the .profile of user is loaded and in this .profile this is done:
export JAVA_HOME="/opt/java"
. /opt/application/config/profile
umask 077
And then we start the applications:
/opt/tomcat/bin/startup.sh
/opt/config/start
/opt/config/start-base prod
Does anybody know if this is possibe? The last three steps are no problem but I don't know about the step that is done about loading the extra profile that is in the .profile of the user "user".
Is it possible to put this all into a script, so that we only have to execute the script during the startup of the server?