some minor tweaks to configfiles

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2015-02-03 21:38:57 +01:00
parent 4fccc86b03
commit d6f3bf112b
11 changed files with 18 additions and 23 deletions

View File

@@ -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/^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/^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/^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' '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
) )
), ),

View File

@@ -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 /* If one of them are not set, call it 'vmail' and suggest creating user/group
* in scripts. */ * in scripts. */
if ($vmail_user === false) { if ($vmail_user === false) {
$vmail_username="vmail"; $vmail_username="vmail";
} else { } else {
$vmail_username=$vmail_user['name']; $vmail_username=$vmail_user['name'];
} }
if ($vmail_group === false) { if ($vmail_group === false) {
$vmail_groupname="vmail"; $vmail_groupname="vmail";
} else { } else {
$vmail_groupname=$vmail_group['name']; $vmail_groupname=$vmail_group['name'];
} }
return array( return array(
@@ -188,6 +188,7 @@ return array(
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'), 'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
'chmod 0750 ' . 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/main.cf /etc/postfix/main.cf.gentoo',
'mv /etc/postfix/master.cf /etc/postfix/master.cf.gentoo',
'touch /etc/postfix/{main,master}.cf', 'touch /etc/postfix/{main,master}.cf',
'chown root:root /etc/postfix/{main,master}.cf', 'chown root:root /etc/postfix/{main,master}.cf',
'chmod 0644 /etc/postfix/{main,master}.cf', 'chmod 0644 /etc/postfix/{main,master}.cf',
@@ -433,5 +434,3 @@ milter_default_action = accept" >> /etc/postfix/main.cf',
) )
) )
); );
?>

View File

@@ -377,6 +377,7 @@ return array(
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')), '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'), '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/^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', '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
'rm /etc/cron.d/awstats' 'rm /etc/cron.d/awstats'
), ),
@@ -416,5 +417,3 @@ return array(
) )
) )
); );
?>

View File

@@ -379,6 +379,7 @@ return array(
'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')), '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'), '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/^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', '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
'rm /etc/cron.d/awstats' 'rm /etc/cron.d/awstats'
), ),
@@ -418,5 +419,3 @@ return array(
) )
) )
); );
?>

View File

@@ -157,6 +157,7 @@ return array(
'label' => 'Awstats', 'label' => 'Awstats',
'commands' => array( 'commands' => array(
'sed -i.bak \'s/^DirData/# DirData/\' '.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' '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
) )
) )
@@ -165,5 +166,3 @@ return array(
) )
) )
); );
?>

View File

@@ -177,6 +177,7 @@ return array(
'commands' => array( 'commands' => array(
'mv '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.conf').' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'), '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/^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' '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
) )
) )
@@ -185,5 +186,3 @@ return array(
) )
) )
); );
?>

View File

@@ -256,6 +256,7 @@ return array(
'commands' => array( 'commands' => array(
'cp /usr/share/doc/packages/awstats/awstats.model.conf /etc/awstats/', '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/^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' '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
) )
) )
@@ -264,5 +265,3 @@ return array(
) )
) )
); );
?>

View File

@@ -376,6 +376,7 @@ return array(
'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')), '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'), '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/^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', '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
'rm /etc/cron.d/awstats' 'rm /etc/cron.d/awstats'
), ),
@@ -415,5 +416,3 @@ return array(
) )
) )
); );
?>

View File

@@ -374,6 +374,7 @@ return array(
'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')), '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'), '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/^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', '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
'rm /etc/cron.d/awstats' 'rm /etc/cron.d/awstats'
), ),
@@ -413,5 +414,3 @@ return array(
) )
) )
); );
?>

View File

@@ -381,6 +381,7 @@ return array(
'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir(Settings::Get('system.awstats_path')), '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'), '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/^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', '# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
'rm /etc/cron.d/awstats' 'rm /etc/cron.d/awstats'
), ),

View File

@@ -24,12 +24,14 @@ $optsDir = new frxDirectory(Settings::Get('system.apacheconf_diroptions'));
if ($vhostDir->isConfigDir()) { if ($vhostDir->isConfigDir()) {
$configcommand['vhost'] = 'mkdir -p ' . Settings::Get('system.apacheconf_vhost'); $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'; $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 { } else {
$configcommand['vhost'] = 'touch ' . Settings::Get('system.apacheconf_vhost'); $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'; $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()) { if ($optsDir->isConfigDir()) {