diff options
author | Renato Botelho <garga@FreeBSD.org> | 2015-02-26 16:11:35 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2015-02-26 16:14:08 -0300 |
commit | e7aca8a470e3ea13e018c99f7db4351c4119f082 (patch) | |
tree | c7bfd2b8c26ce9cfdc5ca3717e125c325503461a /config | |
parent | 275c6d8796ee47be261045c4d53618562f8b42e7 (diff) | |
download | pfsense-packages-e7aca8a470e3ea13e018c99f7db4351c4119f082.tar.gz pfsense-packages-e7aca8a470e3ea13e018c99f7db4351c4119f082.tar.bz2 pfsense-packages-e7aca8a470e3ea13e018c99f7db4351c4119f082.zip |
Update siproxd pbi to 0.8.0_1 on 2.2 and fix startup script, fixes #4217
Diffstat (limited to 'config')
-rw-r--r-- | config/siproxd/siproxd.inc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/config/siproxd/siproxd.inc b/config/siproxd/siproxd.inc index d76f79d3..d9830fb2 100644 --- a/config/siproxd/siproxd.inc +++ b/config/siproxd/siproxd.inc @@ -32,7 +32,8 @@ if(!function_exists("filter_configure")) require_once("service-utils.inc"); // Check to find out on which system the package is running -if (substr(trim(file_get_contents("/etc/version")),0,3) == "2.0") { +$pfs_version = substr(trim(file_get_contents("/etc/version")),0,3); +if ($pfs_version == "2.0") { define('SIPROXD', '/usr/local'); } else { define('SIPROXD', '/usr/pbi/siproxd-' . php_uname("m")); @@ -108,7 +109,7 @@ function siproxd_generate_rules($type) { } function sync_package_siproxd() { - global $config; + global $config, $pfs_version; // put the constant to a variable $varSIPROXD = SIPROXD; @@ -250,9 +251,14 @@ function sync_package_siproxd() { fclose($fout); + if ($pfs_version == '2.2') + $bin_dir='bin'; + else + $bin_dir='sbin'; + write_rcfile(array( "file" => "siproxd.sh", - "start" => "$varSIPROXD/sbin/siproxd -c $varSIPROXD/etc/siproxd.conf &", + "start" => "$varSIPROXD/{$bin_dir}/siproxd -c $varSIPROXD/etc/siproxd.conf &", "stop" => "/usr/bin/killall -9 siproxd" ) ); |