diff --git a/bureau/class/config.php b/bureau/class/config.php index b5443cf5..57d8c8cc 100644 --- a/bureau/class/config.php +++ b/bureau/class/config.php @@ -97,6 +97,8 @@ require_once(dirname(__FILE__)."/local.php"); // The you can't choose where is the AlternC Panel define('ALTERNC_MAIL', "$L_ALTERNC_MAIL"); define('ALTERNC_HTML', "$L_ALTERNC_HTML"); +if(isset($L_ALTERNC_LOGS_ARCHIVE)) + define('ALTERNC_LOGS_ARCHIVE', "$L_ALTERNC_LOGS_ARCHIVE"); define('ALTERNC_LOGS', "$L_ALTERNC_LOGS"); define('WEBSERVERS_LOGS', "$L_WEBSERVERS_LOGS"); define('ALTERNC_PANEL', "/usr/share/alternc/panel"); diff --git a/bureau/class/m_log.php b/bureau/class/m_log.php index 263b84a2..61997a63 100644 --- a/bureau/class/m_log.php +++ b/bureau/class/m_log.php @@ -81,7 +81,11 @@ class m_log { global $cuid,$mem,$err; $err->log("log","get_logs_directory"); // Return an array to allow multiple directory in the future - $c=array("dir"=>WEBSERVERS_LOGS."/".$cuid."-".$mem->user["login"]); + if(defined('ALTERNC_LOGS_ARCHIVE')){ + $c=array("dir"=>ALTERNC_LOGS_ARCHIVE."/".$cuid."-".$mem->user["login"]); + }else{ + $c=array("dir"=>ALTERNC_LOGS."/".$cuid."-".$mem->user["login"]); + } return $c; } diff --git a/debian/alternc.postinst b/debian/alternc.postinst index 545d9356..54586140 100644 --- a/debian/alternc.postinst +++ b/debian/alternc.postinst @@ -126,8 +126,12 @@ INOTIFY_UPDATE_DOMAIN="/var/run/alternc/inotify_do_action.lock" ALTERNC_HTML="" ALTERNC_MAIL="" ALTERNC_LOGS="" -WEBSERVERS_LOGS="" +# Custom directory for archived logs. ALTERNC_LOGS is used by default to view logs files on the panel. +# But you may merge your logs in other directory. In order to view them, +# Uncomment and complete the following variable to use it instead of ALTERNC_LOGS. +#ALTERNC_LOGS_ARCHIVE="" + EOF chown root:alterncpanel $CONFIGFILE @@ -158,7 +162,6 @@ EOF update_var alternc/alternc_html ALTERNC_HTML update_var alternc/alternc_mail ALTERNC_MAIL update_var alternc/alternc_logs ALTERNC_LOGS - update_var alternc/alternc_logs WEBSERVERS_LOGS sed -e "$SED_SCRIPT" < $CONFIGFILE > $CONFIGFILE.tmp mv -f $CONFIGFILE.tmp $CONFIGFILE