# cleanup
rm -f $DF_FILE $DB_FILE $FD_FILE $PEM_FILE
- ### fix privileges
- chown root:bacula /etc/bacula/bacula-fd.pem /etc/bacula/bacula-fd.conf /etc/bacula/bconsole.conf
- chmod 640 /etc/bacula/bacula-fd.pem /etc/bacula/bacula-fd.conf /etc/bacula/bconsole.conf
-
- # report problems
+ # report problems
if [ ! -e $REQUEST_FILE ]; then
db_input high bacula-cn/request-failed || true
db_go || true
fi
}
-
+
+fix_privileges() {
+ # fix privileges
+
+ chown root:bacula /etc/bacula/bacula-fd.pem /etc/bacula/bacula-fd.conf /etc/bacula/bconsole.conf
+ chmod 640 /etc/bacula/bacula-fd.pem /etc/bacula/bacula-fd.conf /etc/bacula/bconsole.conf
+}
+
load_config() {
db_get bacula-cn/hostname
HOST=$RET
generate_fd_config
generate_bconsole_config
+ fix_privileges
+
restart_bacula
send_request