
Create a script and place in /etc/init.d (e.g /etc/init.d/myscript). The script should have the following format:
start() {
# code to start app comes here
# example: daemon program_name &
}
stop() {
# code to stop app comes here
# example: killproc program_name
}
case...