Post job bash scripts
Posted: August 10th, 2017, 4:19 pm
Hello,
I added a couple of post job bash scripts that analyze some parts of the log. The problem is that the results I get are different and limited in comparison with when I run them as root through SSH.
These two scripts analyze the jet backup log and put some statistics in a .txt file which after that I export. I looked at the log file and everything seems ok:
If I run the same script through a simple cron, the resulted output is correct.
From what I tested, there seems to be a permission or environment issue with the post job scripts. Is there a way to debug this or can someone point me in the right direction? Alternatively, is there a way to add some hooks to run my scripts after the backup job is done?
Thank you.
I added a couple of post job bash scripts that analyze some parts of the log. The problem is that the results I get are different and limited in comparison with when I run them as root through SSH.
These two scripts analyze the jet backup log and put some statistics in a .txt file which after that I export. I looked at the log file and everything seems ok:
Code: Select all
[10/Aug/2017 14:35:22 +0000] Executing post job scripts...
[10/Aug/2017 14:35:22 +0000] Executing `/root/scr/myscript.sh -jt`...SUCCESS
[10/Aug/2017 14:35:22 +0000] Executing `/root/scr/myscript.sh -jp`...SUCCESS
[10/Aug/2017 14:35:22 +0000] Job Completed.
From what I tested, there seems to be a permission or environment issue with the post job scripts. Is there a way to debug this or can someone point me in the right direction? Alternatively, is there a way to add some hooks to run my scripts after the backup job is done?
Thank you.