aboutsummaryrefslogtreecommitdiffstats
path: root/config/stunnel
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@G5.local>2009-10-27 16:25:34 -0400
committerScott Ullrich <sullrich@G5.local>2009-10-27 16:25:46 -0400
commitfc9248de4826ae2f58546f0b1329f6127fff5f9d (patch)
treef31e4cf27b54fdb290bb9dffc5925d80293edd0b /config/stunnel
parent2be9ffa7f11999cbb4d1c23cd0cc172ab497afa4 (diff)
downloadpfsense-packages-fc9248de4826ae2f58546f0b1329f6127fff5f9d.tar.gz
pfsense-packages-fc9248de4826ae2f58546f0b1329f6127fff5f9d.tar.bz2
pfsense-packages-fc9248de4826ae2f58546f0b1329f6127fff5f9d.zip
Only fearch item if it exists
Diffstat (limited to 'config/stunnel')
-rw-r--r--config/stunnel/stunnel.inc14
1 files changed, 8 insertions, 6 deletions
diff --git a/config/stunnel/stunnel.inc b/config/stunnel/stunnel.inc
index b7b4e18e..dd312323 100644
--- a/config/stunnel/stunnel.inc
+++ b/config/stunnel/stunnel.inc
@@ -215,12 +215,14 @@ function stunnel_install() {
fwrite($fout, "chroot = /var/tmp/stunnel \n");
fwrite($fout, "setuid = stunnel \n");
fwrite($fout, "setgid = stunnel \n");
- foreach($config['installedpackages']['stunnel']['config'] as $pkgconfig) {
- fwrite($fout, "\n[" . $pkgconfig['description'] . "]\n");
- if($pkgconfig['sourceip']) fwrite($fout, "local = " . $pkgconfig['sourceip'] . "\n");
- fwrite($fout, "accept = " . $pkgconfig['localip'] . ":" . $pkgconfig['localport'] . "\n");
- fwrite($fout, "connect = " . $pkgconfig['redirectip'] . ":" . $pkgconfig['redirectport'] . "\n");
- fwrite($fout, "TIMEOUTclose = 0\n\n");
+ if($config['installedpackages']['stunnel']['config']) {
+ foreach($config['installedpackages']['stunnel']['config'] as $pkgconfig) {
+ fwrite($fout, "\n[" . $pkgconfig['description'] . "]\n");
+ if($pkgconfig['sourceip']) fwrite($fout, "local = " . $pkgconfig['sourceip'] . "\n");
+ fwrite($fout, "accept = " . $pkgconfig['localip'] . ":" . $pkgconfig['localport'] . "\n");
+ fwrite($fout, "connect = " . $pkgconfig['redirectip'] . ":" . $pkgconfig['redirectport'] . "\n");
+ fwrite($fout, "TIMEOUTclose = 0\n\n");
+ }
}
fclose($fout);
conf_mount_ro();