diff options
author | Renato Botelho <renato@netgate.com> | 2015-09-15 10:00:08 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-09-15 10:00:08 -0300 |
commit | c04b3a8e05d704d4b87cb9f597fb0992d04adba5 (patch) | |
tree | d32b2c49d3c8dc25680f18d06347297666de3300 /config | |
parent | 2b0207dc94e61142fcb09bdd0defa8918624e827 (diff) | |
parent | aff23a11418bc79bd4378ddd3474f6813823be57 (diff) | |
download | pfsense-packages-c04b3a8e05d704d4b87cb9f597fb0992d04adba5.tar.gz pfsense-packages-c04b3a8e05d704d4b87cb9f597fb0992d04adba5.tar.bz2 pfsense-packages-c04b3a8e05d704d4b87cb9f597fb0992d04adba5.zip |
Merge pull request #1067 from PiBa-NL/bacula-fix
Diffstat (limited to 'config')
-rw-r--r-- | config/bacula-client/bacula-client.inc | 14 | ||||
-rw-r--r-- | config/bacula-client/bacula-client.xml | 5 | ||||
-rw-r--r-- | config/bacula-client/bacula-client_view_config.php | 6 |
3 files changed, 14 insertions, 11 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 @@ </copyright> <requirements>Bacula Server Installed on your network.</requirements> <name>baculaclient</name> - <version>1.0.10</version> + <version>1.0.11</version> <title>Bacula Client: Settings</title> <aftersaveredirect>/pkg.php?xml=bacula-client.xml</aftersaveredirect> <include_file>/usr/local/pkg/bacula-client.inc</include_file> @@ -156,4 +156,7 @@ <custom_php_resync_config_command> baculaclient_custom_php_write_config(); </custom_php_resync_config_command> + <custom_delete_php_command> + baculaclient_custom_php_write_config(); + </custom_delete_php_command> </packagegui> 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"); <div id="mainarea"> <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td class="tabcont"> - <textarea id="varnishlogs" rows="50" cols="87%"> - <?php + <textarea rows="50" cols="87%"><?php $config_file = file_get_contents(BACULA_LOCALBASE."/etc/bacula/bacula-fd.conf"); echo $config_file; - ?> - </textarea> + ?></textarea> </td></tr> </table> </div> |