We have hosted our application on AIX server. The problem is that we have to start our application manually once the server is rebooted. Please guide me in writing a script that does this job automatically with the re-start of the server. I'm looking for something like windows services in unix.
Either use /etc/inittab, or for more control, put your start / stop script in /etc/init.d, and link your S and K scripts from /etc/rc2.d to the script.
Typically, a basic init.d script will look something like:
#!/bin/ksh
##################################################
# name: myScript.ksh
# purpose: Script to stop and start my application
##################################################
case "$1" in
start )
: commands used to start your application
;;
stop )
: commands used to stop your application
;;
* )
echo "Usage: $0 (start | stop)"
exit 1
esac
where S99 and K01 are the sequence during a startup / shutdown that your application will be started and stopped in relation to other S and K scripts in rc2.d.