From d6f3bf112b357d0da7edfdfeecf9425c065f978f Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Tue, 3 Feb 2015 21:38:57 +0100 Subject: [PATCH] some minor tweaks to configfiles Signed-off-by: Michael Kaufmann (d00p) --- lib/configfiles/freebsd.inc.php | 2 +- lib/configfiles/gentoo.inc.php | 11 +++++------ lib/configfiles/lucid.inc.php | 3 +-- lib/configfiles/precise.inc.php | 3 +-- lib/configfiles/rhel7.inc.php | 3 +-- lib/configfiles/sle10.inc.php | 3 +-- lib/configfiles/sle11.inc.php | 3 +-- lib/configfiles/squeeze.inc.php | 3 +-- lib/configfiles/trusty.inc.php | 3 +-- lib/configfiles/wheezy.inc.php | 1 + lib/configfiles_index.inc.php | 6 ++++-- 11 files changed, 18 insertions(+), 23 deletions(-) diff --git a/lib/configfiles/freebsd.inc.php b/lib/configfiles/freebsd.inc.php index 433ae021..b457fc14 100644 --- a/lib/configfiles/freebsd.inc.php +++ b/lib/configfiles/freebsd.inc.php @@ -383,7 +383,7 @@ return array( 'sed -i.bak \'s/^LogSeparator/# LogSeparator/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), 'sed -i.bak \'s/^SiteDomain/# SiteDomain/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), 'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), - 'sed -i.bak \'s/^DirIcons=\"\/awstatsicons\"/DirIcons=\"\/awstats-icon\"/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), + 'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself' ) ), diff --git a/lib/configfiles/gentoo.inc.php b/lib/configfiles/gentoo.inc.php index 898939c4..ef253fed 100644 --- a/lib/configfiles/gentoo.inc.php +++ b/lib/configfiles/gentoo.inc.php @@ -24,14 +24,14 @@ $vmail_group=posix_getgrgid(Settings::Get('system.vmail_gid')); /* If one of them are not set, call it 'vmail' and suggest creating user/group * in scripts. */ if ($vmail_user === false) { - $vmail_username="vmail"; + $vmail_username="vmail"; } else { - $vmail_username=$vmail_user['name']; + $vmail_username=$vmail_user['name']; } if ($vmail_group === false) { - $vmail_groupname="vmail"; + $vmail_groupname="vmail"; } else { - $vmail_groupname=$vmail_group['name']; + $vmail_groupname=$vmail_group['name']; } return array( @@ -188,6 +188,7 @@ return array( 'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'), 'chmod 0750 ' . Settings::Get('system.vmail_homedir'), 'mv /etc/postfix/main.cf /etc/postfix/main.cf.gentoo', + 'mv /etc/postfix/master.cf /etc/postfix/master.cf.gentoo', 'touch /etc/postfix/{main,master}.cf', 'chown root:root /etc/postfix/{main,master}.cf', 'chmod 0644 /etc/postfix/{main,master}.cf', @@ -433,5 +434,3 @@ milter_default_action = accept" >> /etc/postfix/main.cf', ) ) ); - -?> diff --git a/lib/configfiles/lucid.inc.php b/lib/configfiles/lucid.inc.php index c257672b..3535d537 100644 --- a/lib/configfiles/lucid.inc.php +++ b/lib/configfiles/lucid.inc.php @@ -377,6 +377,7 @@ return array( 'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')), 'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), 'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), + 'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself', 'rm /etc/cron.d/awstats' ), @@ -416,5 +417,3 @@ return array( ) ) ); - -?> diff --git a/lib/configfiles/precise.inc.php b/lib/configfiles/precise.inc.php index ec18eeeb..176f271b 100644 --- a/lib/configfiles/precise.inc.php +++ b/lib/configfiles/precise.inc.php @@ -379,6 +379,7 @@ return array( 'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')), 'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), 'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), + 'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself', 'rm /etc/cron.d/awstats' ), @@ -418,5 +419,3 @@ return array( ) ) ); - -?> diff --git a/lib/configfiles/rhel7.inc.php b/lib/configfiles/rhel7.inc.php index 63b57486..15f44696 100644 --- a/lib/configfiles/rhel7.inc.php +++ b/lib/configfiles/rhel7.inc.php @@ -157,6 +157,7 @@ return array( 'label' => 'Awstats', 'commands' => array( 'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), + 'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself' ) ) @@ -165,5 +166,3 @@ return array( ) ) ); - -?> diff --git a/lib/configfiles/sle10.inc.php b/lib/configfiles/sle10.inc.php index 087752c3..a86ac1e9 100644 --- a/lib/configfiles/sle10.inc.php +++ b/lib/configfiles/sle10.inc.php @@ -177,6 +177,7 @@ return array( 'commands' => array( 'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), 'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), + 'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself' ) ) @@ -185,5 +186,3 @@ return array( ) ) ); - -?> diff --git a/lib/configfiles/sle11.inc.php b/lib/configfiles/sle11.inc.php index 5caad401..74ecaf07 100644 --- a/lib/configfiles/sle11.inc.php +++ b/lib/configfiles/sle11.inc.php @@ -256,6 +256,7 @@ return array( 'commands' => array( 'cp /usr/share/doc/packages/awstats/awstats.model.conf /etc/awstats/', 'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), + 'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself' ) ) @@ -264,5 +265,3 @@ return array( ) ) ); - -?> diff --git a/lib/configfiles/squeeze.inc.php b/lib/configfiles/squeeze.inc.php index 0c0d2847..b4e081c1 100644 --- a/lib/configfiles/squeeze.inc.php +++ b/lib/configfiles/squeeze.inc.php @@ -376,6 +376,7 @@ return array( 'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')), 'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), 'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), + 'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself', 'rm /etc/cron.d/awstats' ), @@ -415,5 +416,3 @@ return array( ) ) ); - -?> diff --git a/lib/configfiles/trusty.inc.php b/lib/configfiles/trusty.inc.php index df6573e3..ca11c944 100644 --- a/lib/configfiles/trusty.inc.php +++ b/lib/configfiles/trusty.inc.php @@ -374,6 +374,7 @@ return array( 'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')), 'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), 'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), + 'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself', 'rm /etc/cron.d/awstats' ), @@ -413,5 +414,3 @@ return array( ) ) ); - -?> diff --git a/lib/configfiles/wheezy.inc.php b/lib/configfiles/wheezy.inc.php index e1054e11..b45c3f48 100644 --- a/lib/configfiles/wheezy.inc.php +++ b/lib/configfiles/wheezy.inc.php @@ -381,6 +381,7 @@ return array( 'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')), 'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), 'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), + 'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself', 'rm /etc/cron.d/awstats' ), diff --git a/lib/configfiles_index.inc.php b/lib/configfiles_index.inc.php index de27797b..44308f06 100644 --- a/lib/configfiles_index.inc.php +++ b/lib/configfiles_index.inc.php @@ -24,12 +24,14 @@ $optsDir = new frxDirectory(Settings::Get('system.apacheconf_diroptions')); if ($vhostDir->isConfigDir()) { $configcommand['vhost'] = 'mkdir -p ' . Settings::Get('system.apacheconf_vhost'); - $configcommand['include'] = 'echo -e "\\nInclude ' . makeCorrectDir(Settings::Get('system.apacheconf_vhost')) . '*.conf" >> ' . makeCorrectFile(makeCorrectDir('/etc/apache2/httpd.conf')); $configcommand['v_inclighty'] = 'echo -e \'\\ninclude_shell "cat ' . makeCorrectDir(Settings::Get('system.apacheconf_vhost')) . '*.conf"\' >> /etc/lighttpd/lighttpd.conf'; + // this is only used for SUSE - can we check whether this is still needed? + $configcommand['include'] = 'echo -e "\\nInclude ' . makeCorrectDir(Settings::Get('system.apacheconf_vhost')) . '*.conf" >> ' . makeCorrectFile(makeCorrectDir('/etc/apache2/httpd.conf')); } else { $configcommand['vhost'] = 'touch ' . Settings::Get('system.apacheconf_vhost'); - $configcommand['include'] = 'echo -e "\\nInclude ' . Settings::Get('system.apacheconf_vhost') . '" >> ' . makeCorrectFile('/etc/apache2/httpd.conf'); $configcommand['v_inclighty'] = 'echo -e \'\\ninclude "' . Settings::Get('system.apacheconf_vhost') . '"\' >> /etc/lighttpd/lighttpd.conf'; + // this is only used for SUSE - can we check whether this is still needed? + $configcommand['include'] = 'echo -e "\\nInclude ' . Settings::Get('system.apacheconf_vhost') . '" >> ' . makeCorrectFile('/etc/apache2/httpd.conf'); } if ($optsDir->isConfigDir()) {