runit = false;
if ((script->when & SCRIPT_Before) && (when & SCRIPT_Before)) {
- if ((script->on_success
- && (jcr->JobStatus == JS_Running || jcr->JobStatus == JS_Created))
- || (script->on_failure && job_canceled(jcr))
+ if ((script->on_success &&
+ (jcr->JobStatus == JS_Running || jcr->JobStatus == JS_Created))
+ || (script->on_failure &&
+ (job_canceled(jcr) || jcr->JobStatus == JS_Differences))
)
{
Dmsg4(200, "runscript: Run it because SCRIPT_Before (%s,%i,%i,%c)\n",
if ((script->when & SCRIPT_After) && (when & SCRIPT_After)) {
if ((script->on_success &&
(jcr->JobStatus == JS_Terminated || jcr->JobStatus == JS_Warnings))
- || (script->on_failure && job_canceled(jcr))
+ || (script->on_failure &&
+ (job_canceled(jcr) || jcr->JobStatus == JS_Differences))
)
{
Dmsg4(200, "runscript: Run it because SCRIPT_After (%s,%i,%i,%c)\n",