aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcelloc <marcellocoutinho@gmail.com>2011-12-21 17:42:13 -0200
committermarcelloc <marcellocoutinho@gmail.com>2011-12-21 17:42:13 -0200
commit192bf0e5f5a336bb7e912cd919709c67a0d0a23a (patch)
treeb07a6e054010d732d75bd9642add6c2de7fd813d
parent6fed1f42c3b08ab0debd9d3a1e05202b2ba32760 (diff)
downloadpfsense-packages-192bf0e5f5a336bb7e912cd919709c67a0d0a23a.tar.gz
pfsense-packages-192bf0e5f5a336bb7e912cd919709c67a0d0a23a.tar.bz2
pfsense-packages-192bf0e5f5a336bb7e912cd919709c67a0d0a23a.zip
postfix - include pfsense version in system.inc backup file
-rw-r--r--config/postfix/postfix.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/postfix/postfix.inc b/config/postfix/postfix.inc
index 4d203474..831e6bb2 100644
--- a/config/postfix/postfix.inc
+++ b/config/postfix/postfix.inc
@@ -295,6 +295,7 @@ function sync_package_postfix() {
}
#update /etc/inc/system.inc
$sys_log_file='/etc/inc/system.inc';
+ $pfsense_version=preg_replace("/\s/","",file_get_contents("/etc/version"));
$sys_log = file($sys_log_file);
$new_sys_log="";
$found_mail=0;
@@ -308,8 +309,8 @@ function sync_package_postfix() {
}
$new_sys_log .= $new_line;
}
- if (!file_exists('/root/system.inc.backup')) {
- copy ($sys_log_file,'/root/system.inc.backup');
+ if (!file_exists('/root/'.$pfsense_version.'.system.inc.backup')) {
+ copy ($sys_log_file,'/root/'.$pfsense_version.'.system.inc.backup');
}
file_put_contents($sys_log_file,$new_sys_log, LOCK_EX);
#mwexec('/usr/local/bin/php -q /usr/local/www/postfix_syslog.php');