remove old/unused config-template-files (replaced by XML)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -1,429 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Configfiles
|
||||
*
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
||||
$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";
|
||||
} else {
|
||||
$vmail_username=$vmail_user['name'];
|
||||
}
|
||||
if ($vmail_group === false) {
|
||||
$vmail_groupname="vmail";
|
||||
} else {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return array(
|
||||
'freebsd' => array(
|
||||
'label' => 'FreeBSD',
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => array(
|
||||
'nginx' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/www/nginx',
|
||||
'make config',
|
||||
'set [x] IPv6 protocol (default)',
|
||||
'set [x] Enable HTTP module (default)',
|
||||
'set [x] Enable http_cache module (default)',
|
||||
'set [x] Enable http_gzip_static module',
|
||||
'set [x] Enable http_rewrite module (default)',
|
||||
'set [x] Enable http_ssl module (default)',
|
||||
'set [x] Enable http_stub_status module (default)',
|
||||
'make install clean; rehash',
|
||||
),
|
||||
'commands_2' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p '. Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p '. Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'mkdir -p '. Settings::Get('system.logfiles_directory'),
|
||||
'echo "nginx_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'usr_local_etc_nginx_nginx.conf' => '/usr/local/etc/nginx/nginx.conf',
|
||||
),
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/nginx restart'
|
||||
)
|
||||
),
|
||||
'apache2' => array(
|
||||
'label' => 'Apache2 Webserver',
|
||||
'commands' => array(
|
||||
'cd /usr/ports/www/apache22',
|
||||
'make config',
|
||||
'make install',
|
||||
$configcommand['vhost'],
|
||||
'chown root:0 ' . Settings::Get('system.apacheconf_vhost'),
|
||||
'chmod 0600 ' . Settings::Get('system.apacheconf_vhost'),
|
||||
$configcommand['diroptions'],
|
||||
'chown root:0 ' . Settings::Get('system.apacheconf_diroptions'),
|
||||
'chmod 0600 ' . Settings::Get('system.apacheconf_diroptions'),
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'echo "accf_http_load=\"YES\"" >> /boot/loader.conf',
|
||||
'echo "accf_data_load=\"YES\"" >> /boot/loader.conf',
|
||||
'echo "apache22_enable=\"YES\"" >> /etc/rc.conf',
|
||||
),
|
||||
'restart' => array(
|
||||
'sh /usr/local/etc/rc.d/apache22 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => array(
|
||||
|
||||
// Begin: Bind 9.x Config
|
||||
'bind9' => array(
|
||||
'label' => 'Bind9 Nameserver',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/dns/bind99',
|
||||
'make config',
|
||||
'set [x] International Domain Names',
|
||||
'set [x] IPv6 protocol (default)',
|
||||
'set [x] 64-bit file support',
|
||||
'set [x] Replace base BIND with this version',
|
||||
'set [x] Enable RPZ NSDNAME policy records',
|
||||
'set [x] Enable RPZ NSIP trigger rules',
|
||||
'set [x] dig/host/nslookup will do DNSSEC validation',
|
||||
'set [x] Build with OpenSSL (Required for DNSSEC) (default)',
|
||||
'set [x] Threading support (default)',
|
||||
'make install clean; rehash',
|
||||
),
|
||||
'commands_2' => array(
|
||||
'echo "named_enable=\"YES\"" >> /etc/rc.conf',
|
||||
PHP_EOL,
|
||||
(strpos(Settings::Get('system.bindconf_directory'), '/etc/namedb') === false) ? '(TIP: Be sure the path below is "/etc/namedb", if not you have configured the bind-directory in a false way in PANEL->SETTINGS->NAMESERVER SETTINGS!)' : null,
|
||||
'echo "include \"'. Settings::Get('system.bindconf_directory') .'froxlor_bind.conf\";" >> '. Settings::Get('system.bindconf_directory') .'named.conf',
|
||||
'echo "include \"'. Settings::Get('system.bindconf_directory') .'default-zone\";" >> '. Settings::Get('system.bindconf_directory') .'named.conf',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_namedb_named.conf' => Settings::Get('system.bindconf_directory') .'named.conf',
|
||||
'etc_namedb_master_default.zone' => Settings::Get('system.bindconf_directory') .'master/default.zone',
|
||||
'etc_namedb_default-zone' => Settings::Get('system.bindconf_directory') .'default-zone',
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/rc.d/named restart'
|
||||
)
|
||||
),
|
||||
// End: Bind 9.x Config
|
||||
|
||||
'powerdns' => array(
|
||||
'label' => 'PowerDNS',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/dns/powerdns',
|
||||
'make config',
|
||||
'set MySQL backend',
|
||||
'make install',
|
||||
'echo "pdns_enable=\"YES\"" >> /etc/rc.conf',
|
||||
),
|
||||
'files' => array(
|
||||
'usr_local_etc_pdns_pdns.conf' => '/usr/local/etc/pdns/pdns.conf'
|
||||
),
|
||||
'commands' => array(
|
||||
'touch ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chown root:0 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chmod 0600 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'sh /usr/local/etc/rc.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => array(
|
||||
'postfix' => array(
|
||||
'label' => 'Postfix',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/mail/postfix',
|
||||
'make config',
|
||||
'set Dovecot SASL authentication method',
|
||||
'set Enable SSL and TLS support',
|
||||
'set MySQL maps (choose version with WITH_MYSQL_VER)',
|
||||
'make install'
|
||||
),
|
||||
'commands_2' => array(
|
||||
($vmail_group === false) ? 'pw groupadd ' . $vmail_groupname . ' -g '.Settings::Get('system.vmail_gid') : '',
|
||||
($vmail_user === false) ? 'pw useradd ' . $vmail_username . ' -u '.Settings::Get('system.vmail_uid').' -g '.Settings::Get('system.vmail_gid').' -s/sbin/nologin -d/dev/null' : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
||||
'chmod 0750 ' . Settings::Get('system.vmail_homedir')
|
||||
),
|
||||
'commands_3' => array(
|
||||
'echo "sendmail_enable=\"NO\"" >> /etc/rc.conf',
|
||||
'echo "sendmail_submit_enable=\"NO\"" >> /etc/rc.conf',
|
||||
'echo "sendmail_outbound_enable=\"NO\"" >> /etc/rc.conf',
|
||||
'echo "sendmail_msp_queue_enable=\"NO\"" >> /etc/rc.conf',
|
||||
'echo "postfix_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_periodic.conf' => '/etc/periodic.conf',
|
||||
'usr_local_etc_postfix_main.cf' => '/usr/local/etc/postfix/main.cf',
|
||||
'usr_local_etc_postfix_mysql-virtual_alias_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'usr_local_etc_postfix_mysql-virtual_mailbox_domains.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'usr_local_etc_postfix_mysql-virtual_mailbox_maps.cf' => '/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'usr_local_etc_postfix_mysql-virtual_sender_permissions.cf' => '/usr/local/etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'mkdir /var/spool/postfix/etc',
|
||||
'cp /etc/resolv.conf /var/spool/postfix/etc',
|
||||
'sh /usr/local/etc/rc.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postgrey' => array(
|
||||
'label' => 'Postgrey',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/mail/postgrey',
|
||||
'make install clean'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'sed -i.bak \'s/# *check_policy_service *inet:127\.0\.0\.1:10023/ check_policy_service inet:127\.0\.0\.1:10023/\' /usr/local/etc/postfix/main.cf',
|
||||
'echo "postgrey_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/postgrey restart',
|
||||
'/usr/local/etc/rc.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/usr/local/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/usr/local/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => array(
|
||||
'postmap /usr/local/etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands' => array(
|
||||
'cd /usr/ports/mail/dkim-milter/',
|
||||
'make install clean',
|
||||
'touch /usr/local/etc/mail/dkim-filter.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'dkim-filter.conf' => '/usr/local/etc/mail/dkim-filter.conf',
|
||||
'postfix_dkim_addition.cf' => '/usr/local/etc/postfix/main.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/milter-dkim restart '
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => array(
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/mail/dovecot',
|
||||
'make config',
|
||||
'set kqueue(2) support ',
|
||||
'set SSL support ',
|
||||
'set ManageSieve support (optional)',
|
||||
'set MySQL support ',
|
||||
'make install',
|
||||
'echo "dovecot_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'usr_local_etc_dovecot.conf' => '/usr/local/etc/dovecot.conf',
|
||||
'usr_local_etc_dovecot-sql.conf' => '/usr/local/etc/dovecot-sql.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'echo "dovecot unix - n n - - pipe
|
||||
flags=DRhu user='.$vmail_username.':'.$vmail_groupname.' argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}" >> /usr/local/etc/postfix/master.cf',
|
||||
'chmod 0640 /usr/local/etc/dovecot-sql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'sh /usr/local/etc/rc.d/dovecot restart'
|
||||
)
|
||||
),
|
||||
|
||||
// Begin: Dovecot 2.x Config
|
||||
'dovecot2' => array(
|
||||
'label' => 'Dovecot 2.x',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/mail/dovecot2',
|
||||
'make config',
|
||||
'set [x] kqueue(2) support (default)',
|
||||
'set [x] MySQL database',
|
||||
'set [x] SSL protocol (default)',
|
||||
'make install clean; rehash',
|
||||
),
|
||||
'commands_2' => array(
|
||||
'echo "dovecot_enable=\"YES\"" >> /etc/rc.conf',
|
||||
PHP_EOL,
|
||||
'pw adduser '. $vmail_username .' -g '. $vmail_groupname .' -u '. Settings::Get('system.vmail_gid') .' -d /nonexistent -s /usr/sbin/nologin -c "User for virtual mailtransport used by Postfix and Dovecot"',
|
||||
PHP_EOL,
|
||||
'chmod 0640 /usr/local/etc/dovecot-sql.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'usr_local_etc_dovecot_dovecot.conf' => '/usr/local/etc/dovecot/dovecot.conf',
|
||||
'usr_local_etc_dovecot_dovecot-sql.conf' => '/usr/local/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'commands_3' => array(
|
||||
'echo "dovecot unix - n n - - pipe'. PHP_EOL .'flags=DRhu user='. $vmail_username .':'. $vmail_groupname .' argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient} -a ${recipient}" >> /usr/local/etc/postfix/master.cf',
|
||||
),
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
// End: Dovecot 2.x Config
|
||||
|
||||
)
|
||||
),
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/ftp/proftpd',
|
||||
'make config',
|
||||
'set MySQL auth',
|
||||
'set Include mod_quota',
|
||||
'make install clean'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'touch /usr/local/etc/proftpd.conf',
|
||||
'chown root:0 /usr/local/etc/proftpd.conf',
|
||||
'chmod 0600 /usr/local/etc/proftpd.conf',
|
||||
'echo "proftpd_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_proftpd_proftpd.conf' => '/usr/local/etc/proftpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => array (
|
||||
'label' => 'Pure-FTPd',
|
||||
'commands_1' => array (
|
||||
'cd /usr/ports/ftp/pure-ftpd',
|
||||
'make config',
|
||||
'# select LARGEFILE,MYSQL,PAM,PRIVSEP,SENDFILE,THROTTLING,TLS,UTF8,VIRTUALCHROOT',
|
||||
'make install clean'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'touch /usr/local/etc/pure-ftpd.conf',
|
||||
'touch /usr/local/etc/pureftpd-mysql.conf',
|
||||
'chown root:0 /usr/local/etc/pure-ftpd.conf',
|
||||
'chown root:0 /usr/local/etc/pureftpd-mysql.conf',
|
||||
'chmod 0600 /usr/local/etc/pure-ftpd.conf',
|
||||
'chmod 0600 /usr/local/etc/pureftpd-mysql.conf',
|
||||
'echo "pure-ftpd_enable="YES" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'usr_local_etc_pure-ftpd.conf' => '/usr/local/etc/pure-ftpd.conf',
|
||||
'usr_local_etc_pureftpd-mysql.conf' => '/usr/local/etc/pureftpd-mysql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'service pure-ftpd restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'commands' => array(
|
||||
'echo "*/5 * * * * root nice -n 5 /usr/local/bin/php -q '.makeCorrectDir(dirname(dirname(dirname(__FILE__)))).'scripts/froxlor_master_cronjob.php" >> /etc/crontab'
|
||||
),
|
||||
'restart' => array(
|
||||
Settings::Get('system.crondreload')
|
||||
)
|
||||
),
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => array(
|
||||
'cd /usr/ports/www/awstats/',
|
||||
'make install clean',
|
||||
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir(Settings::Get('system.awstats_conf')),
|
||||
'sed -i.bak \'s/^LogFile/# LogFile/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^LogType/# LogType/\' '.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^LogFormat/# LogFormat/\' '.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/^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'
|
||||
)
|
||||
),
|
||||
'libnss' => array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/net/libnss-mysql',
|
||||
'make install clean',
|
||||
'echo "nscd_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'usr_local_etc_libnss-mysql.cfg' => '/usr/local/etc/libnss-mysql.cfg',
|
||||
'usr_local_etc_libnss-mysql-root.cfg' => '/usr/local/etc/libnss-mysql-root.cfg',
|
||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod 600 /usr/local/etc/libnss-mysql.cfg /usr/local/etc/libnss-mysql-root.cfg'
|
||||
),
|
||||
'restart' => array(
|
||||
'sh /etc/rc.d/nscd restart'
|
||||
)
|
||||
),
|
||||
'logrotate' => array(
|
||||
'label' => 'Logrotate',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/sysutils/logrotate/',
|
||||
'make install clean clean-depends',
|
||||
'touch /etc/logrotate.d/froxlor',
|
||||
'chmod 644 /etc/logrotate.d/froxlor'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_logrotated_froxlor' => '/etc/logrotate.d/froxlor'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'# create cronjob-entry (daily-recommended)',
|
||||
'0 2 * * * /usr/local/sbin/logrotate -f /etc/logrotate.d/froxlor'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,419 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Configfiles
|
||||
*
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
||||
$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";
|
||||
} else {
|
||||
$vmail_username=$vmail_user['name'];
|
||||
}
|
||||
if ($vmail_group === false) {
|
||||
$vmail_groupname="vmail";
|
||||
} else {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return array(
|
||||
'ubuntu_lucid' => array(
|
||||
'label' => 'Ubuntu 10.04 (Lucid) [deprecated]',
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => array(
|
||||
'apache2' => array(
|
||||
'label' => 'Apache 2',
|
||||
'commands' => array(
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'a2dismod userdir'
|
||||
),
|
||||
'files' => ((int)Settings::Get('phpfpm.enabled') == 1) ?
|
||||
array(
|
||||
'etc_apache2_mods-enabled_fastcgi.conf' => '/etc/apache2/mods-enabled/fastcgi.conf'
|
||||
)
|
||||
:
|
||||
null,
|
||||
'restart' => array(
|
||||
'/etc/init.d/apache2 restart'
|
||||
),
|
||||
),
|
||||
'lighttpd' => array(
|
||||
'label' => 'Lighttpd Webserver',
|
||||
'commands_1' => array(
|
||||
'apt-get install lighttpd',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf',
|
||||
),
|
||||
'commands_2' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir')
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
),
|
||||
),
|
||||
'nginx' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => array(
|
||||
'apt-get install nginx php5-cgi',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_nginx_nginx.conf' => '/etc/nginx/nginx.conf',
|
||||
'etc_init.d_php-fcgi' => '/etc/init.d/php-fcgi'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'rm /etc/nginx/sites-enabled/default',
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod u+x /etc/init.d/php-fcgi'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/php-fcgi start',
|
||||
'/etc/init.d/nginx restart'
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
)
|
||||
),
|
||||
'powerdns' => array(
|
||||
'label' => 'PowerDNS',
|
||||
'files' => array(
|
||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => array(
|
||||
'postfix_courier' => array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
||||
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'touch /etc/postfix/sasl/smtpd.conf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0600 /etc/postfix/sasl/smtpd.conf',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands_1' => array(
|
||||
'apt-get install dkim-filter',
|
||||
'mkdir -p /etc/postfix/dkim'
|
||||
),
|
||||
'files' => array(
|
||||
'dkim-filter.conf' => '/etc/dkim-filter.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'echo "milter_default_action = accept" >> /etc/postfix/main.cf',
|
||||
'echo "milter_protocol = 2" >> /etc/postfix/main.cf',
|
||||
'echo "smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf',
|
||||
'echo "non_smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/dkim-filter restart',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
||||
'apt-get install postfix postfix-mysql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:root /etc/postfix/master.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0644 /etc/postfix/master.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => array(
|
||||
'dpkg-reconfigure exim4-config',
|
||||
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
||||
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
||||
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
||||
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
||||
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod o-rx /var/lib/exim4',
|
||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/exim4 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'commands' => array(
|
||||
'apt-get install courier-pop courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
|
||||
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => array(
|
||||
'apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_dovecot_auth.d_01-dovecot-postfix.auth' => '/etc/dovecot/auth.d/01-dovecot-postfix.auth',
|
||||
'etc_dovecot_conf.d_01-dovecot-postfix.conf' => '/etc/dovecot/conf.d/01-dovecot-postfix.conf',
|
||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => array(
|
||||
'label' => 'Pure FTPd',
|
||||
'commands_1' => array(
|
||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID',
|
||||
'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile',
|
||||
'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous',
|
||||
'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime',
|
||||
'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone',
|
||||
'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication',
|
||||
'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf',
|
||||
'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof',
|
||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/pure-ftpd-mysql restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => array(
|
||||
Settings::Get('system.crondreload')
|
||||
)
|
||||
),
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => array(
|
||||
'apt-get install awstats',
|
||||
'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'
|
||||
),
|
||||
),
|
||||
'libnss' => array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands' => array(
|
||||
'apt-get install libnss-mysql nscd',
|
||||
'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_nss-mysql.conf' => '/etc/nss-mysql.conf',
|
||||
'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf',
|
||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/nscd restart'
|
||||
)
|
||||
),
|
||||
'logrotate' => array(
|
||||
'label' => 'Logrotate',
|
||||
'commands_1' => array(
|
||||
'apt-get install logrotate',
|
||||
'touch /etc/logrotate.d/froxlor',
|
||||
'chmod 644 /etc/logrotate.d/froxlor'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_logrotated_froxlor' => '/etc/logrotate.d/froxlor'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'# apt automatically adds a daily cronjob for logrotate',
|
||||
'# you do not have to do anything else :)'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,188 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Configfiles
|
||||
*
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
||||
$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";
|
||||
} else {
|
||||
$vmail_username=$vmail_user['name'];
|
||||
}
|
||||
if ($vmail_group === false) {
|
||||
$vmail_groupname="vmail";
|
||||
} else {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return array(
|
||||
'sle_10' => array(
|
||||
'label' => 'SUSE Linux Enterprise 10 (deprecated)',
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => array(
|
||||
'apache' => array(
|
||||
'label' => 'Apache',
|
||||
'commands' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['include'],
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : ''
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/apache2 restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => array(
|
||||
'echo "include \"' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf\";" >> /etc/named.conf',
|
||||
'touch ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chown named:0 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chmod 0600 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/named restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => array(
|
||||
'postfix' => array(
|
||||
'label' => 'Postfix',
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'usr_lib_sasl2_smtpd.conf' => '/usr/lib/sasl2/smtpd.conf'
|
||||
),
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'touch /usr/lib/sasl2/smtpd.conf',
|
||||
'chmod 660 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 660 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 660 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 660 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 660 /usr/lib/sasl2/smtpd.conf',
|
||||
'chgrp postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chgrp postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chgrp postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chgrp postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chgrp postfix /usr/lib/sasl2/smtpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'files' => array(
|
||||
'etc_authlib_authdaemonrc' => '/etc/authlib/authdaemonrc',
|
||||
'etc_authlib_authmysqlrc' => '/etc/authlib/authmysqlrc'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'files' => array(
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => array(
|
||||
Settings::Get('system.crondreload')
|
||||
)
|
||||
),
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'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'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,267 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2011- the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Andrej Semen <asemen@suse.de> (2010-2011)
|
||||
* @author Wolfgang Rosenauer <wr@rosenauer.org> (2011)
|
||||
* @author Froxlor team <team@froxlor.org> (2011-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Configfiles
|
||||
*
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
||||
$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";
|
||||
} else {
|
||||
$vmail_username=$vmail_user['name'];
|
||||
}
|
||||
if ($vmail_group === false) {
|
||||
$vmail_groupname="vmail";
|
||||
} else {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return array(
|
||||
'sle_11' => array(
|
||||
'label' => 'SUSE Linux Enterprise 11',
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => array(
|
||||
'apache' => array(
|
||||
'label' => 'Apache',
|
||||
'commands' => array(
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
'Maybe add to /etc/apache2/httpd.conf',
|
||||
'Alias /mail /srv/www/htdocs/roundcubemail',
|
||||
'Alias /webmail /srv/www/htdocs/squirrelmail',
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : ''
|
||||
),
|
||||
'restart' => array(
|
||||
' '.
|
||||
'/etc/init.d/apache2 restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => array(
|
||||
'Add froxlor_bind.conf to the NAMED_CONF_INCLUDE_FILES in /etc/sysconfig/named'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/named restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => array(
|
||||
'postfix' => array(
|
||||
'label' => 'Postfix',
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql_virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql_virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql_virtual_mailbox_maps.cf',
|
||||
'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf'
|
||||
),
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . Settings::Get('system.vmail_homedir'),
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/sasl2/smtpd.conf',
|
||||
'chmod 660 /etc/postfix/mysql_virtual_alias_maps.cf',
|
||||
'chmod 660 /etc/postfix/mysql_virtual_mailbox_domains.cf',
|
||||
'chmod 660 /etc/postfix/mysql_virtual_mailbox_maps.cf',
|
||||
'chmod 660 /etc/sasl2/smtpd.conf',
|
||||
'chgrp postfix /etc/postfix/mysql_virtual_alias_maps.cf',
|
||||
'chgrp postfix /etc/postfix/mysql_virtual_mailbox_domains.cf',
|
||||
'chgrp postfix /etc/postfix/mysql_virtual_mailbox_maps.cf',
|
||||
'chgrp postfix /etc/sasl2/smtpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'zypper install postfix postfix-mysql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'exim4' => array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => array(
|
||||
'zypper install exim'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
||||
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
||||
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
||||
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
||||
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod o-rx /var/lib/exim4',
|
||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/exim4 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'commands' => array(
|
||||
'zypper install courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_authlib_authdaemonrc' => '/etc/authlib/authdaemonrc',
|
||||
'etc_authlib_authmysqlrc' => '/etc/authlib/authmysqlrc'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot 1.1',
|
||||
'commands_1' => array(
|
||||
'zypper install dovecot11'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'files' => array(
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => array(
|
||||
'label' => 'Pure-FTPd',
|
||||
'files' => array(
|
||||
'etc_pure-ftpd.conf' => '/etc/pure-ftpd/pure-ftpd.conf',
|
||||
'etc_pure-ftpd_mysql.conf' => '/etc/pure-ftpd/pure-ftpd-mysql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/pure-ftpd restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => array(
|
||||
Settings::Get('system.crondreload')
|
||||
)
|
||||
),
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'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'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,418 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Configfiles
|
||||
*
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid(Settings::Get('system.vmail_uid'));
|
||||
$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";
|
||||
} else {
|
||||
$vmail_username=$vmail_user['name'];
|
||||
}
|
||||
if ($vmail_group === false) {
|
||||
$vmail_groupname="vmail";
|
||||
} else {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return array(
|
||||
'debian_squeeze' => array(
|
||||
'label' => 'Debian 6.0 (Squeeze) [deprecated]',
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => array(
|
||||
'apache2' => array(
|
||||
'label' => 'Apache 2',
|
||||
'commands' => array(
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'a2dismod userdir'
|
||||
),
|
||||
'files' => ((int)Settings::Get('phpfpm.enabled') == 1) ?
|
||||
array(
|
||||
'etc_apache2_mods-enabled_fastcgi.conf' => '/etc/apache2/mods-enabled/fastcgi.conf'
|
||||
)
|
||||
:
|
||||
null,
|
||||
'restart' => array(
|
||||
'/etc/init.d/apache2 restart'
|
||||
),
|
||||
),
|
||||
'lighttpd' => array(
|
||||
'label' => 'Lighttpd Webserver',
|
||||
'commands_1' => array(
|
||||
'apt-get install lighttpd',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf',
|
||||
),
|
||||
'commands_2' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir')
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
)
|
||||
),
|
||||
'nginx' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => array(
|
||||
'apt-get install nginx php5-cgi',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_nginx_nginx.conf' => '/etc/nginx/nginx.conf',
|
||||
'etc_init.d_php-fcgi' => '/etc/init.d/php-fcgi'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'rm /etc/nginx/sites-enabled/default',
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod u+x /etc/init.d/php-fcgi'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/php-fcgi start',
|
||||
'/etc/init.d/nginx restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
)
|
||||
),
|
||||
'powerdns' => array(
|
||||
'label' => 'PowerDNS',
|
||||
'files' => array(
|
||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => array(
|
||||
'postfix_courier' => array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' '.$vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . Settings::Get('system.vmail_homedir'),
|
||||
'apt-get install postfix postfix-mysql libsasl2-2 libsasl2-modules libsasl2-modules-sql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'touch /etc/postfix/sasl/smtpd.conf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chown root:root /etc/postfix/sasl/smtpd.conf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0600 /etc/postfix/sasl/smtpd.conf',
|
||||
),
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands_1' => array(
|
||||
'apt-get install dkim-filter',
|
||||
'mkdir -p /etc/postfix/dkim'
|
||||
),
|
||||
'files' => array(
|
||||
'dkim-filter.conf' => '/etc/dkim-filter.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'echo "milter_default_action = accept" >> /etc/postfix/main.cf',
|
||||
'echo "milter_protocol = 2" >> /etc/postfix/main.cf',
|
||||
'echo "smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf',
|
||||
'echo "non_smtpd_milters = inet:localhost:8891" >> /etc/postfix/main.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/dkim-filter restart',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . Settings::Get('system.vmail_gid') . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . Settings::Get('system.vmail_uid') . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . Settings::Get('system.vmail_homedir'),
|
||||
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . Settings::Get('system.vmail_homedir'),
|
||||
'apt-get install postfix postfix-mysql',
|
||||
'mkdir -p /var/spool/postfix/etc/pam.d',
|
||||
'mkdir -p /var/spool/postfix/var/run/mysqld',
|
||||
'touch /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'touch /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'touch /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chown root:root /etc/postfix/main.cf',
|
||||
'chown root:root /etc/postfix/master.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chown root:postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0644 /etc/postfix/main.cf',
|
||||
'chmod 0644 /etc/postfix/master.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf',
|
||||
'etc_postfix_master.cf' => '/etc/postfix/master.cf',
|
||||
'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf',
|
||||
'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => array(
|
||||
'dpkg-reconfigure exim4-config',
|
||||
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul',
|
||||
'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config',
|
||||
'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options',
|
||||
'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config',
|
||||
'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod o-rx /var/lib/exim4',
|
||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/exim4 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'commands' => array(
|
||||
'apt-get install courier-pop courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
|
||||
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => array(
|
||||
'apt-get install dovecot-imapd dovecot-pop3d'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf',
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => array(
|
||||
'label' => 'Pure FTPd',
|
||||
'commands_1' => array(
|
||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID',
|
||||
'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile',
|
||||
'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous',
|
||||
'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime',
|
||||
'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone',
|
||||
'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication',
|
||||
'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf',
|
||||
'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof',
|
||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/pure-ftpd-mysql restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => array(
|
||||
Settings::Get('system.crondreload')
|
||||
)
|
||||
),
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => array(
|
||||
'apt-get install awstats',
|
||||
'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'
|
||||
),
|
||||
),
|
||||
'libnss' => array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands' => array(
|
||||
'apt-get install libnss-mysql nscd',
|
||||
'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_nss-mysql.conf' => '/etc/nss-mysql.conf',
|
||||
'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf',
|
||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
||||
),
|
||||
'restart' => array(
|
||||
'/etc/init.d/nscd restart'
|
||||
)
|
||||
),
|
||||
'logrotate' => array(
|
||||
'label' => 'Logrotate',
|
||||
'commands_1' => array(
|
||||
'apt-get install logrotate',
|
||||
'touch /etc/logrotate.d/froxlor',
|
||||
'chmod 644 /etc/logrotate.d/froxlor'
|
||||
),
|
||||
'files' => array(
|
||||
'etc_logrotated_froxlor' => '/etc/logrotate.d/froxlor'
|
||||
),
|
||||
'commands_2' => array(
|
||||
'# apt automatically adds a daily cronjob for logrotate',
|
||||
'# you do not have to do anything else :)'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user