I have a script in a folder:
/home/ubuntu/jasperreports-server-cp-6.3.0/ctlscript.sh
I need this script to run every time the server starts. Usually the server shuts down on Friday evenings and starts on Monday morning. What do I need to do in order to make this happen?.
How I manually start the script:
I will ssh
to the server, and then go to this location /home/ubuntu/jasperreports-server-cp-6.3.0
and then run ./ctlscript.sh* start
command manually.
But I am unable to start this script at the server start on Monday automatically.
I tried using rc.local
, and also creating a script in /etc/init.d
, I did follow this but it didn't work either How do I run a script at start up?.
Does anyone have any other suggestions? Or is my procedure wrong?