8) using sudo with autochanger
################ FILE COPY #####################################
+ # you must get bweb cvs files
+ cvs -d:pserver:anonymous@bacula.cvs.sourceforge.net:/cvsroot/bacula login
+ cvs -z3 -d:pserver:anonymous@bacula.cvs.sourceforge.net:/cvsroot/bacula co -P gui
+ cd gui
# first, copy bweb perl librarie in your PERL5 INC path
install -m 644 -o root -g root bweb/lib/*.pm /usr/share/perl5
# done !
+ WARNING : Your www-data user must be able to execute bconsole and able to read bconsole.conf !
+ You can create an bconsole group for that.
+
################ INSTALL PERL LIBRARY ##########################
- perl modules
patch -p1 < message.patch
--- cvs/src/lib/message.c 2006-07-27 21:06:20.000000000 +0200
+++ cvs/src/lib/message.c.director 2006-07-28 13:46:49.171083494 +0200
-@@ -716,6 +716,18 @@
+@@ -716,6 +716,20 @@
}
fputs(dt, d->fd);
fputs(msg, d->fd);
+ char *p = (char *)malloc(len * 2 + 1);
+ db_escape_string(p, msg, len);
+ FILE *fp = fopen("/tmp/log.sql", "a");
-+ fprintf(fp, "INSERT INTO Log (Time, JobId, LogText) VALUES (NOW(),%s, '%s');\n", edit_int64(jcr->JobId, ed1), p);
-+ fclose(fp);
++ if (fp) {
++ fprintf(fp, "INSERT INTO Log (Time, JobId, LogText) VALUES (Now(), %s, '%s');\n", edit_int64(jcr->JobId, ed1), p);
++ fclose(fp);
++ }
+ }
+
break;
To get bweb working, you must follow these rules
- Media, Storage and Pool must have [A-Za-z_0-9\.-]+ (no space)
- - AutoChanger name must be same as Storage name device in bacula
+ - AutoChanger name must be same as Device and Location name in bacula
################ SUDO CONFIGURATION ############################