myScript above accept start and stop as arguments .
Refer your ‘tomcat’ script in /etc/init.d/tomcat if you want to
know how to accept above arguments (if you dont have stop ,
then it will retry same thing at shutdown).
my above script eg is for start/stop vpn.