From aff23a11418bc79bd4378ddd3474f6813823be57 Mon Sep 17 00:00:00 2001 From: PiBa-NL Date: Mon, 14 Sep 2015 23:46:32 +0200 Subject: bacula-client, better handling for remote director and messages pkg 1.0.11 submitted by compdoc --- config/bacula-client/bacula-client.inc | 14 ++++++++------ config/bacula-client/bacula-client.xml | 5 ++++- config/bacula-client/bacula-client_view_config.php | 6 ++---- pkg_config.10.xml | 2 +- pkg_config.8.xml | 2 +- pkg_config.8.xml.amd64 | 2 +- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/config/bacula-client/bacula-client.inc b/config/bacula-client/bacula-client.inc index 397cf7a4..a251baae 100644 --- a/config/bacula-client/bacula-client.inc +++ b/config/bacula-client/bacula-client.inc @@ -50,6 +50,7 @@ function baculaclient_custom_php_deinstall_command(){ function baculaclient_custom_php_write_config(){ global $config, $LocalDirector; + $RemoteDirector = ""; conf_mount_rw(); // Check config_file @@ -72,21 +73,22 @@ function baculaclient_custom_php_write_config(){ switch ($bc['type']) { case "Director": $baculaclient_conf .= "Director { \n\tName = {$bc['director']}-dir #{$bc['description']}\n\tPassword = \"{$bc['password']}\"\n}\n"; + $RemoteDirector = $bc['director']; break; case "Monitor": $baculaclient_conf .= "Director { \n\tName = {$bc['director']}-mon #{$bc['description']}\n\tPassword = \"{$bc['password']}\"\n\tMonitor = yes\n}\n"; break; case "Local": - $baculaclient_conf .= "Director { \n\tName = {$bc['director']}-dir #{$bc['description']}\n\tPassword = \"{$bc['password']}\"\n}\n"; - $baculaclient_conf .= "Director { \n\tName = {$bc['director']}-mon #{$bc['description']}\n\tPassword = \"{$bc['password']}\"\n\tMonitor = yes\n}\n"; + $baculaclient_conf .= "Director { \n\tName = {$bc['director']}-fd #{$bc['description']}\n\tPassword = \"{$bc['password']}\"\n}\n"; $LocalDirector = $bc['director']; } } - // Create Messages - if (!empty($LocalDirector)) { - $baculaclient_conf .= "Messages { \n\tName = Standard \n\tdirector = {$LocalDirector}-dir = all, !skipped, !restored\n}\n"; + // Create Messages. + // Messages should be sent to the master Director + if (!empty($RemoteDirector)) { + $baculaclient_conf .= "Messages { \n\tName = Standard #send messages here\n\tdirector = {$RemoteDirector}-dir = all, !skipped, !restored\n}\n"; } // Create FileDaemon if (is_array($config['installedpackages']['baculaclientfd']['config'])) { @@ -94,7 +96,7 @@ function baculaclient_custom_php_write_config(){ $jobs = $config['installedpackages']['baculaclientfd']['config'][0]['jobs'] ?: '20'; } if (!empty($LocalDirector)) { - $baculaclient_conf .= "FileDaemon { \n\tName = {$LocalDirector}-fd #\n\tFDport = {$port}\n\tWorkingDirectory = /var/db/bacula\n\tPid Directory = /var/run\n\tMaximum Concurrent Jobs = {$jobs}\n}\n"; + $baculaclient_conf .= "FileDaemon { \n\tName = {$LocalDirector}-fd #this is the local pfSense Director\n\tFDport = {$port}\n\tWorkingDirectory = /var/db/bacula\n\tPid Directory = /var/run\n\tMaximum Concurrent Jobs = {$jobs}\n}\n"; } // Write config file and start service diff --git a/config/bacula-client/bacula-client.xml b/config/bacula-client/bacula-client.xml index 30c1fa86..fd1e744d 100644 --- a/config/bacula-client/bacula-client.xml +++ b/config/bacula-client/bacula-client.xml @@ -44,7 +44,7 @@ Bacula Server Installed on your network. baculaclient - 1.0.10 + 1.0.11 Bacula Client: Settings /pkg.php?xml=bacula-client.xml /usr/local/pkg/bacula-client.inc @@ -156,4 +156,7 @@ baculaclient_custom_php_write_config(); + + baculaclient_custom_php_write_config(); + diff --git a/config/bacula-client/bacula-client_view_config.php b/config/bacula-client/bacula-client_view_config.php index e087cc54..dacdc98c 100644 --- a/config/bacula-client/bacula-client_view_config.php +++ b/config/bacula-client/bacula-client_view_config.php @@ -62,12 +62,10 @@ include("head.inc");
- + ?>
diff --git a/pkg_config.10.xml b/pkg_config.10.xml index f377e189..b007398b 100644 --- a/pkg_config.10.xml +++ b/pkg_config.10.xml @@ -1397,7 +1397,7 @@ Bacula is a set of Open Source computer programs that permit managings backups, recovery, and verification of computer data across a network of computers of different kinds. http://www.bacula.org/ Services - 1.0.10 + 1.0.11 Stable 2.2 https://packages.pfsense.org/packages/config/bacula-client/bacula-client.xml diff --git a/pkg_config.8.xml b/pkg_config.8.xml index 4ec08c6b..a265cd1d 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -1614,7 +1614,7 @@ http://www.bacula.org/ Services - 5.2.12_3 pkg v 1.0.10 + 5.2.12_3 pkg v 1.0.11 Stable 2.0 https://packages.pfsense.org/packages/config/bacula-client/bacula-client.xml diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index dd044e70..89100c32 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -1601,7 +1601,7 @@ http://www.bacula.org/ Services - 5.2.12_3 pkg v 1.0.10 + 5.2.12_3 pkg v 1.0.11 Stable 2.0 https://packages.pfsense.org/packages/config/bacula-client/bacula-client.xml -- cgit v1.2.3