I wrote a very small and simple script to stop a service, backup a folder, copy it to a remote location via scp and then start the service again.
Everything works except for one thing, the service does not want to start for some reason, I have to manually ssh into the server and execute the comand to start it.
Here is the script, like I said, nothing fancy:
If I input the last command on the command line it works no problem, its only when the scheduled job runs that I run into this issue.
tar cvzf $FILE OpenbravoERP-3.0
scp $FILE 126.96.36.199:/REMOTE/LOCATION
I have also tried putting the scp command at the end to see if it made any difference, but same problem.
How can I debug this?
thanks a lot for the help!
ps: I checked the scp command above and its completing succesfully (I can see the file on the remote location).