diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2015-09-14 23:46:32 +0200 |
---|---|---|
committer | PiBa-NL <pba_2k3@yahoo.com> | 2015-09-14 23:46:32 +0200 |
commit | aff23a11418bc79bd4378ddd3474f6813823be57 (patch) | |
tree | 857e48a239a4d09b5eae80d34f8c148b07698360 /config/bacula-client | |
parent | b5403ef8fd4fda190e79fe458ac5295d9394e6cb (diff) | |
download | pfsense-packages-aff23a11418bc79bd4378ddd3474f6813823be57.tar.gz pfsense-packages-aff23a11418bc79bd4378ddd3474f6813823be57.tar.bz2 pfsense-packages-aff23a11418bc79bd4378ddd3474f6813823be57.zip |
bacula-client, better handling for remote director and messages pkg 1.0.11
submitted by compdoc
Diffstat (limited to 'config/bacula-client')
-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> |