]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/dird_conf.c
Add RunBeforeJob and RunAfterJob -- kes18Jul02
[bacula/bacula] / bacula / src / dird / dird_conf.c
index 1cc6195c4ae98b7c9885f30aef13652e0adb5761..a16f3aa3352e687c76a271d451ac59f2659e3d4f 100644 (file)
@@ -177,6 +177,8 @@ static struct res_items job_items[] = {
    {"prunejobs",   store_yesno, ITEM(res_job.PruneJobs), 1, ITEM_DEFAULT, 0},
    {"prunefiles",  store_yesno, ITEM(res_job.PruneFiles), 1, ITEM_DEFAULT, 0},
    {"prunevolumes", store_yesno, ITEM(res_job.PruneVolumes), 1, ITEM_DEFAULT, 0},
+   {"runbeforejob", store_str,  ITEM(res_job.RunBeforeJob), 0, 0, 0},
+   {"runafterjob",  store_str,  ITEM(res_job.RunAfterJob),  0, 0, 0},
    {NULL, NULL, NULL, 0, 0, 0} 
 };
 
@@ -476,6 +478,12 @@ void dump_resource(int type, RES *reshdr, void sendit(void *sock, char *fmt, ...
         if (res->res_job.RestoreBootstrap) {
             sendit(sock, "  --> Bootstrap=%s\n", NPRT(res->res_job.RestoreBootstrap));
         }
+        if (res->res_job.RunBeforeJob) {
+            sendit(sock, "  --> RunBefore=%s\n", NPRT(res->res_job.RunBeforeJob));
+        }
+        if (res->res_job.RunAfterJob) {
+            sendit(sock, "  --> RunAfter=%s\n", NPRT(res->res_job.RunAfterJob));
+        }
         if (res->res_job.storage) {
             sendit(sock, "  --> ");
            dump_resource(-R_STORAGE, (RES *)res->res_job.storage, sendit, sock);
@@ -703,6 +711,12 @@ void free_resource(int type)
         if (res->res_job.RestoreBootstrap) {
            free(res->res_job.RestoreBootstrap);
         }
+        if (res->res_job.RunBeforeJob) {
+           free(res->res_job.RunBeforeJob);
+        }
+        if (res->res_job.RunAfterJob) {
+           free(res->res_job.RunAfterJob);
+        }
         break;
       case R_MSGS:
         if (res->res_msgs.mail_cmd)