I am fololowing this link but this did not work for me .
My start up script is:
#!/bin/bash
java -jar AppDemo.jar
My stop script is:
#!/bin/bash
#Grabs and kill a process from the pidlist that was the word app
pid=ps aux | grep AppDemo | awk '{print $2}'
kill -9 $pid
Myscript for init.d is:
!/bin/bash
# AppDemo
#
# description: Start Jar on system boot
case $1 in
start)
/bin/bash /usr/local/bin/AppDemo-start.sh
;;
stop)
/bin/bash /usr/local/bin/AppDemo-stop.sh
;;
restart)
/bin/bash /usr/local/bin/App-Demo.sh
/bin/bash /usr/local/bin/App-Demo.sh
;;
esac
exit 0
this is now working for me. I don't know what I did wrong can anybody please help?