aboutsummaryrefslogtreecommitdiffstats
path: root/config/postfix/postfix.inc
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2014-11-25 17:33:36 -0200
committerMarcello Coutinho <marcellocoutinho@gmail.com>2014-11-25 17:33:36 -0200
commit8ddbda625f617a48a768cc9fd99f0fe40b6bab74 (patch)
treea0d92a12e918c8379aa474a3d132e85f9d61f352 /config/postfix/postfix.inc
parent9c355a9f2ea48991ae456c0704ba0b2c4fae014c (diff)
downloadpfsense-packages-8ddbda625f617a48a768cc9fd99f0fe40b6bab74.tar.gz
pfsense-packages-8ddbda625f617a48a768cc9fd99f0fe40b6bab74.tar.bz2
pfsense-packages-8ddbda625f617a48a768cc9fd99f0fe40b6bab74.zip
Postix - add etc folder check on pfsense 2.2
Diffstat (limited to 'config/postfix/postfix.inc')
-rwxr-xr-xconfig/postfix/postfix.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc
index 35087149..eb5499aa 100755
--- a/config/postfix/postfix.inc
+++ b/config/postfix/postfix.inc
@@ -728,6 +728,12 @@ MASTEREOF2;
conf_mount_rw();
+ //check postfix etc dir on 2.2
+ $pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
+ $postfix_etc_lnk="/usr/local/etc/postfix";
+ if ($pfs_version == 2.2 && !is_dir($postfix_etc_lnk))
+ @symlink(POSTFIX_LOCALBASE.'/etc/postfix',$postfix_etc_lnk);
+
log_error("Writing out configuration");
file_put_contents(POSTFIX_LOCALBASE."/etc/postfix/main.cf", $postfix_main, LOCK_EX);
file_put_contents(POSTFIX_LOCALBASE."/etc/postfix/master.cf", $postfix_master, LOCK_EX);