diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-01-02 12:44:50 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-01-02 12:44:50 -0200 |
commit | 22c884d104498547356e6144b6a0c22300085b22 (patch) | |
tree | 7f7a9b7f44c5e974956def258e04129a1e55a969 /config/bacula-client/bacula-client.inc | |
parent | bdf71c5659ad14c22ca0395f87327a3963a7ffb3 (diff) | |
download | pfsense-packages-22c884d104498547356e6144b6a0c22300085b22.tar.gz pfsense-packages-22c884d104498547356e6144b6a0c22300085b22.tar.bz2 pfsense-packages-22c884d104498547356e6144b6a0c22300085b22.zip |
Fix bacula-fd.conf path, it fixes #3729
Diffstat (limited to 'config/bacula-client/bacula-client.inc')
-rw-r--r-- | config/bacula-client/bacula-client.inc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/config/bacula-client/bacula-client.inc b/config/bacula-client/bacula-client.inc index 94411809..233de4b6 100644 --- a/config/bacula-client/bacula-client.inc +++ b/config/bacula-client/bacula-client.inc @@ -59,7 +59,7 @@ function baculaclient_custom_php_deinstall_command(){ unlink_if_exists(BACULA_LOCALBASE."/etc/bacula-fd.conf"); // 2. Re-run sshd config generation script - exec("/usr/local/etc/rc.d/bacula-fd.sh stop"); + exec(BACULA_LOCALBASE . "/etc/rc.d/bacula-fd.sh stop"); conf_mount_ro(); } @@ -67,11 +67,12 @@ function baculaclient_custom_php_write_config(){ global $g, $config; conf_mount_rw(); //check config_file - $startup_file="/usr/local/etc/rc.d/bacula-fd"; + $startup_file=BACULA_LOCALBASE . "/etc/rc.d/bacula-fd"; if (file_exists($startup_file)){ $startup_script=file_get_contents($startup_file); $startup_script=preg_replace("/NO/","YES",$startup_script); $startup_script=preg_replace("@/usr/local/etc/bacula-fd.conf@",BACULA_LOCALBASE."/etc/bacula-fd.conf",$startup_script); + $startup_script=preg_replace("@" . BACULA_LOCALBASE . "/etc/bacula/bacula-fd.conf@",BACULA_LOCALBASE."/etc/bacula-fd.conf",$startup_script); file_put_contents("{$startup_file}.sh",$startup_script,LOCK_EX); // Ensure bacula-fd has a+rx exec("chmod a+rx {$startup_file}.sh"); @@ -111,10 +112,10 @@ function baculaclient_custom_php_write_config(){ } $baculaclient_conf .= "FileDaemon { \n\t Name = {$LocalDirector}-fd #\n\t FDport = {$port}\n\t WorkingDirectory = /var/db/bacula\n\t Pid Directory = /var/run\n\tMaximum Concurrent Jobs = {$jobs}\n\t}\n"; file_put_contents(BACULA_LOCALBASE."/etc/bacula-fd.conf",$baculaclient_conf,LOCK_EX); - exec("/usr/local/etc/rc.d/bacula-fd.sh restart"); + exec(BACULA_LOCALBASE . "/etc/rc.d/bacula-fd.sh restart"); // Mount Read-only conf_mount_ro(); } } - ?>
\ No newline at end of file + ?> |