aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeswitch_dev
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-08-05 03:55:54 -0600
committermcrane <mctch@yahoo.com>2009-08-05 03:55:54 -0600
commitf765b4203e632dcb30ec65c04719cfd54a47588c (patch)
tree595fe9cc2437ba4055d92048b99f65485667bbe8 /config/freeswitch_dev
parent94d02a8f34691f09eed2c162bc312c45ff7bda4c (diff)
downloadpfsense-packages-f765b4203e632dcb30ec65c04719cfd54a47588c.tar.gz
pfsense-packages-f765b4203e632dcb30ec65c04719cfd54a47588c.tar.bz2
pfsense-packages-f765b4203e632dcb30ec65c04719cfd54a47588c.zip
FreeSWITCH dev pkg_add check if the package is already installed. If it isn't installed then download and install it.
Diffstat (limited to 'config/freeswitch_dev')
-rw-r--r--config/freeswitch_dev/v_config.inc14
1 files changed, 10 insertions, 4 deletions
diff --git a/config/freeswitch_dev/v_config.inc b/config/freeswitch_dev/v_config.inc
index b15b0eb0..74ba18ff 100644
--- a/config/freeswitch_dev/v_config.inc
+++ b/config/freeswitch_dev/v_config.inc
@@ -2978,10 +2978,16 @@ function sync_package_freeswitch()
function pkg_add($pkg_download_path, $pkg_name)
{
- chdir('/tmp/');
- exec("fetch ".$pkg_download_path.$pkg_name);
- exec("pkg_add -F ".$pkg_name);
- exec("rm ".$pkg_name);
+
+ $pkg_array = split("\.", $pkg_name);
+ //if the package is not installed then download and install it
+ if (!strlen(exec('pkg_info | grep '.$pkg_array[0])) > 0) {
+ chdir('/tmp/');
+ exec("fetch ".$pkg_download_path.$pkg_name);
+ exec("pkg_add -F ".$pkg_name);
+ exec("rm ".$pkg_name);
+ }
+
}
function v_php_install_command()