even moar implementations of new Settings-class, refs #1325
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
|
||||
$vmail_group=posix_getgrgid($settings['system']['vmail_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. */
|
||||
@@ -32,18 +32,18 @@ if ($vmail_group === false) {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return Array(
|
||||
'freebsd' => Array(
|
||||
return array(
|
||||
'freebsd' => array(
|
||||
'label' => 'FreeBSD',
|
||||
'services' => Array(
|
||||
'http' => Array(
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => Array(
|
||||
'daemons' => array(
|
||||
|
||||
// Begin: Nginx Config
|
||||
'nginx' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/www/nginx',
|
||||
'make config',
|
||||
'set [x] IPv6 protocol (default)',
|
||||
@@ -58,10 +58,10 @@ return Array(
|
||||
'commands_2' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p '. $settings['system']['deactivateddocroot'] : null,
|
||||
'mkdir -p '. $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p '. $settings['system']['mod_fcgid_tmpdir'],
|
||||
'mkdir -p '. $settings['system']['logfiles_directory'],
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p '. Settings::Get('system.deactivateddocroot') : null,
|
||||
'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(
|
||||
@@ -73,41 +73,41 @@ return Array(
|
||||
),
|
||||
// End: Nginx Config
|
||||
|
||||
'apache2' => Array(
|
||||
'apache2' => array(
|
||||
'label' => 'Apache2 Webserver',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'cd /usr/ports/www/apache22',
|
||||
'make config',
|
||||
'make install',
|
||||
$configcommand['vhost'],
|
||||
'chown root:0 ' . $settings['system']['apacheconf_vhost'],
|
||||
'chmod 0600 ' . $settings['system']['apacheconf_vhost'],
|
||||
'chown root:0 ' . Settings::Get('system.apacheconf_vhost'),
|
||||
'chmod 0600 ' . Settings::Get('system.apacheconf_vhost'),
|
||||
$configcommand['diroptions'],
|
||||
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
|
||||
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'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(
|
||||
'restart' => array(
|
||||
'sh /usr/local/etc/rc.d/apache22 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'dns' => Array(
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => Array(
|
||||
'daemons' => array(
|
||||
|
||||
// Begin: Bind 9.x Config
|
||||
'bind9' => array(
|
||||
'label' => 'Bind9 Nameserver',
|
||||
'commands_1' => array(
|
||||
'label' => 'Bind9 Nameserver',
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/dns/bind99',
|
||||
'make config',
|
||||
'set [x] International Domain Names',
|
||||
@@ -124,14 +124,14 @@ return Array(
|
||||
'commands_2' => array(
|
||||
'echo "named_enable=\"YES\"" >> /etc/rc.conf',
|
||||
PHP_EOL,
|
||||
(strpos($settings['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['system']['bindconf_directory'] .'froxlor_bind.conf\";" >> '. $settings['system']['bindconf_directory'] .'named.conf',
|
||||
'echo "include \"'. $settings['system']['bindconf_directory'] .'default-zone\";" >> '. $settings['system']['bindconf_directory'] .'named.conf',
|
||||
(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['system']['bindconf_directory'] .'named.conf',
|
||||
'etc_namedb_master_default.zone' => $settings['system']['bindconf_directory'] .'master/default.zone',
|
||||
'etc_namedb_default-zone' => $settings['system']['bindconf_directory'] .'default-zone',
|
||||
'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'
|
||||
@@ -139,35 +139,35 @@ return Array(
|
||||
),
|
||||
// End: Bind 9.x Config
|
||||
|
||||
'powerdns' => Array(
|
||||
'powerdns' => array(
|
||||
'label' => 'PowerDNS',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/dns/powerdns',
|
||||
'make config',
|
||||
'set MySQL backend',
|
||||
'make install',
|
||||
'echo "pdns_enable=\"YES\"" >> /etc/rc.conf',
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'usr_local_etc_pdns_pdns.conf' => '/usr/local/etc/pdns/pdns.conf'
|
||||
),
|
||||
'commands' => Array(
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown root:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.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(
|
||||
'restart' => array(
|
||||
'sh /usr/local/etc/rc.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => Array(
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix' => Array(
|
||||
'daemons' => array(
|
||||
'postfix' => array(
|
||||
'label' => 'Postfix',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/mail/postfix',
|
||||
'make config',
|
||||
'set Dovecot SASL authentication method',
|
||||
@@ -175,21 +175,21 @@ return Array(
|
||||
'set MySQL maps (choose version with WITH_MYSQL_VER)',
|
||||
'make install'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
($vmail_group === false) ? 'pw groupadd ' . $vmail_groupname . ' -g '.$settings['system']['vmail_gid'] : '',
|
||||
($vmail_user === false) ? 'pw useradd ' . $vmail_username . ' -u '.$settings['system']['vmail_uid'].' -g '.$settings['system']['vmail_gid'].' -s/sbin/nologin -d/dev/null' : '',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
|
||||
'chmod 0750 ' . $settings['system']['vmail_homedir']
|
||||
'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(
|
||||
'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(
|
||||
'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',
|
||||
@@ -197,64 +197,64 @@ return Array(
|
||||
'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(
|
||||
'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(
|
||||
'postgrey' => array(
|
||||
'label' => 'Postgrey',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/mail/postgrey',
|
||||
'make install clean'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/postgrey restart',
|
||||
'/usr/local/etc/rc.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'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(
|
||||
'commands_1' => array(
|
||||
'postmap /usr/local/etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => Array(
|
||||
'dkim' => array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'cd /usr/ports/mail/dkim-milter/',
|
||||
'make install clean',
|
||||
'touch /usr/local/etc/mail/dkim-filter.conf'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'dkim-filter.conf' => '/usr/local/etc/mail/dkim-filter.conf',
|
||||
'postfix_dkim_addition.cf' => '/usr/local/etc/postfix/main.cf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/milter-dkim restart '
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => Array(
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => Array(
|
||||
'dovecot' => Array(
|
||||
'daemons' => array(
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/mail/dovecot',
|
||||
'make config',
|
||||
'set kqueue(2) support ',
|
||||
@@ -264,16 +264,16 @@ return Array(
|
||||
'make install',
|
||||
'echo "dovecot_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => Array(
|
||||
'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(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'sh /usr/local/etc/rc.d/dovecot restart'
|
||||
)
|
||||
),
|
||||
@@ -292,7 +292,7 @@ return Array(
|
||||
'commands_2' => array(
|
||||
'echo "dovecot_enable=\"YES\"" >> /etc/rc.conf',
|
||||
PHP_EOL,
|
||||
'pw adduser '. $vmail_username .' -g '. $vmail_groupname .' -u '. $settings['system']['vmail_gid'] .' -d /nonexistent -s /usr/sbin/nologin -c "User for virtual mailtransport used by Postfix and Dovecot"',
|
||||
'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'
|
||||
),
|
||||
@@ -311,77 +311,77 @@ return Array(
|
||||
|
||||
)
|
||||
),
|
||||
'ftp' => Array(
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands_1' => Array(
|
||||
'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',
|
||||
),
|
||||
'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(
|
||||
'files' => array(
|
||||
'etc_proftpd_proftpd.conf' => '/usr/local/etc/proftpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/usr/local/etc/rc.d/proftpd restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'etc' => Array(
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => Array(
|
||||
'cron' => Array(
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'commands' => Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/rc.d/cron restart'
|
||||
)
|
||||
),
|
||||
'awstats' => Array(
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'cd /usr/ports/www/awstats/',
|
||||
'make install clean',
|
||||
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir($settings['system']['awstats_conf']),
|
||||
'sed -i.bak \'s/^LogFile/# LogFile/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^LogType/# LogType/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^LogFormat/# LogFormat/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^LogSeparator/# LogSeparator/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^SiteDomain/# SiteDomain/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirIcons=\"\/awstatsicons\"/DirIcons=\"\/awstats-icon\"/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'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=\"\/awstatsicons\"/DirIcons=\"\/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(
|
||||
'libnss' => array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'cd /usr/ports/net/libnss-mysql',
|
||||
'make install clean',
|
||||
'echo "nscd_enable=\"YES\"" >> /etc/rc.conf'
|
||||
),
|
||||
'files' => Array(
|
||||
'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(
|
||||
'commands_2' => array(
|
||||
'chmod 600 /usr/local/etc/libnss-mysql.cfg /usr/local/etc/libnss-mysql-root.cfg'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'sh /etc/rc.d/nscd restart'
|
||||
)
|
||||
),
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
|
||||
$vmail_group=posix_getgrgid($settings['system']['vmail_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. */
|
||||
@@ -34,119 +34,119 @@ if ($vmail_group === false) {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return Array(
|
||||
'gentoo' => Array(
|
||||
return array(
|
||||
'gentoo' => array(
|
||||
'label' => 'Gentoo',
|
||||
'services' => Array(
|
||||
'http' => Array(
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => Array(
|
||||
'apache2' => Array(
|
||||
'daemons' => array(
|
||||
'apache2' => array(
|
||||
'label' => 'Apache2 Webserver',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
$configcommand['vhost'],
|
||||
'chown root:0 ' . $settings['system']['apacheconf_vhost'],
|
||||
'chmod 0600 ' . $settings['system']['apacheconf_vhost'],
|
||||
'chown root:0 ' . Settings::Get('system.apacheconf_vhost'),
|
||||
'chmod 0600 ' . Settings::Get('system.apacheconf_vhost'),
|
||||
$configcommand['diroptions'],
|
||||
'chown root:0 ' . $settings['system']['apacheconf_diroptions'],
|
||||
'chmod 0600 ' . $settings['system']['apacheconf_diroptions'],
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||
'chown root:0 ' . Settings::Get('system.apacheconf_diroptions'),
|
||||
'chmod 0600 ' . Settings::Get('system.apacheconf_diroptions'),
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
'mkdir -p ' . Settings::Get('system.mod_fcgid_tmpdir'),
|
||||
'chmod 1777 ' . Settings::Get('system.mod_fcgid_tmpdir')
|
||||
),
|
||||
'files' => ((int)$settings['phpfpm']['enabled'] == 1) ?
|
||||
Array(
|
||||
'etc_apache2_modules.d_70_fastcgi.conf' => '/etc/apache2/modules.d/70_fastcgi.conf'
|
||||
)
|
||||
:
|
||||
null,
|
||||
'restart' => Array(
|
||||
'files' => ((int)Settings::Get('phpfpm.enabled') == 1) ?
|
||||
array(
|
||||
'etc_apache2_modules.d_70_fastcgi.conf' => '/etc/apache2/modules.d/70_fastcgi.conf'
|
||||
)
|
||||
:
|
||||
null,
|
||||
'restart' => array(
|
||||
'rc-update add apache2 default',
|
||||
'/etc/init.d/apache2 restart'
|
||||
)
|
||||
),
|
||||
'lighttpd' => Array(
|
||||
'lighttpd' => array(
|
||||
'label' => 'Lighttpd Webserver',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'emerge -av lighttpd'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : '',
|
||||
'rc-update add lighttpd default'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
)
|
||||
),
|
||||
'nginx' => Array(
|
||||
'nginx' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'emerge nginx',
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_nginx_nginx.conf' => '/etc/nginx/nginx.conf',
|
||||
'etc_init.d_php-fcgi' => '/etc/init.d/php-fcgi'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
'mkdir -p ' . $settings['system']['deactivateddocroot'],
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'commands_2' => array(
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
'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',
|
||||
'rc-update add nginx default'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/nginx restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'dns' => Array(
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => Array(
|
||||
'bind' => Array(
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9 Nameserver',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_bind_default.zone' => '/etc/bind/default.zone'
|
||||
),
|
||||
'commands' => Array(
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown named:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'commands' => array(
|
||||
'echo "include \"' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf\";" >> /etc/bind/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',
|
||||
'rc-update add named default'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/named restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => Array(
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix_courier' => Array(
|
||||
'daemons' => array(
|
||||
'postfix_courier' => array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'commands_1' => Array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'commands_1' => 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 : '',
|
||||
'echo "mail-mta/postfix -dovecot-sasl sasl" >> /etc/portage/package.use',
|
||||
'emerge -av postfix',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
|
||||
'chmod 0750 ' . $settings['system']['vmail_homedir'],
|
||||
'emerge -av postfix',
|
||||
'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'),
|
||||
'mv /etc/postfix/main.cf /etc/postfix/main.cf.gentoo',
|
||||
'touch /etc/postfix/main.cf',
|
||||
'touch /etc/sasl2/smtpd.conf',
|
||||
@@ -160,7 +160,7 @@ return Array(
|
||||
' chmod 0640 /etc/postfix/mysql-virtual_${suffix}.cf',
|
||||
'done'
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -170,23 +170,23 @@ return Array(
|
||||
'etc_postfix_mysql-virtual_gid_maps.cf' => '/etc/postfix/mysql-virtual_gid_maps.cf',
|
||||
'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'rc-update add postfix default'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => Array(
|
||||
'postfix_dovecot' => array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands_1' => Array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'commands_1' => 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 : '',
|
||||
'echo "mail-mta/postfix dovecot-sasl -sasl" >> /etc/portage/package.use',
|
||||
'emerge -av postfix',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
|
||||
'chmod 0750 ' . $settings['system']['vmail_homedir'],
|
||||
'emerge -av postfix',
|
||||
'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'),
|
||||
'mv /etc/postfix/main.cf /etc/postfix/main.cf.gentoo',
|
||||
'touch /etc/postfix/{main,master}.cf',
|
||||
'chown root:root /etc/postfix/{main,master}.cf',
|
||||
@@ -197,7 +197,7 @@ return Array(
|
||||
' chmod 0640 /etc/postfix/mysql-virtual_${suffix}.cf',
|
||||
'done'
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -207,55 +207,55 @@ return Array(
|
||||
'etc_postfix_mysql-virtual_uid_maps.cf' => '/etc/postfix/mysql-virtual_uid_maps.cf',
|
||||
'etc_postfix_mysql-virtual_gid_maps.cf' => '/etc/postfix/mysql-virtual_gid_maps.cf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'rc-update add postfix default'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => Array(
|
||||
'dkim' => array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'emerge dkim-milter',
|
||||
'emerge --config mail-filter/dkim-milter',
|
||||
'mkdir -p /etc/postfix/dkim'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'dkim-filter.conf' => '/etc/mail/dkim-filter/dkim-filter.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'echo "smtpd_milters = inet:localhost:8891
|
||||
milter_macro_daemon_name = SIGNING
|
||||
milter_default_action = accept" >> /etc/postfix/main.cf',
|
||||
'rc-update add dkim-filter default'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => Array(
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => Array(
|
||||
'courier' => Array(
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier-IMAP (POP3/IMAP)',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'rm /etc/courier/authlib/authdaemonrc',
|
||||
'rm /etc/courier/authlib/authmysqlrc',
|
||||
'rm /etc/courier-imap/pop3d',
|
||||
@@ -269,7 +269,7 @@ milter_default_action = accept" >> /etc/postfix/main.cf',
|
||||
'touch /etc/courier-imap/pop3d-ssl',
|
||||
'touch /etc/courier-imap/imapd-ssl'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_courier_authlib_authdaemonrc' => '/etc/courier/authlib/authdaemonrc',
|
||||
'etc_courier_authlib_authmysqlrc' => '/etc/courier/authlib/authmysqlrc',
|
||||
'etc_courier-imap_pop3d' => '/etc/courier-imap/pop3d',
|
||||
@@ -277,7 +277,7 @@ milter_default_action = accept" >> /etc/postfix/main.cf',
|
||||
'etc_courier-imap_pop3d-ssl' => '/etc/courier-imap/pop3d-ssl',
|
||||
'etc_courier-imap_imapd-ssl' => '/etc/courier-imap/imapd-ssl'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'chown root:0 /etc/courier/authlib/authdaemonrc',
|
||||
'chown root:0 /etc/courier/authlib/authmysqlrc',
|
||||
'chown root:0 /etc/courier-imap/pop3d',
|
||||
@@ -294,15 +294,15 @@ milter_default_action = accept" >> /etc/postfix/main.cf',
|
||||
'rc-update add courier-pop3d default',
|
||||
'rc-update add courier-imapd default'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authlib restart',
|
||||
'/etc/init.d/courier-pop3d restart',
|
||||
'/etc/init.d/courier-imapd restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => Array(
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'echo "net-mail/dovecot mysql" >> /etc/portage/package.use',
|
||||
'emerge -av dovecot',
|
||||
'mv /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.gentoo',
|
||||
@@ -310,110 +310,110 @@ milter_default_action = accept" >> /etc/postfix/main.cf',
|
||||
'touch /etc/dovecot/dovecot.conf',
|
||||
'touch /etc/dovecot/dovecot-sql.conf',
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf',
|
||||
'rc-update add dovecot default'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => Array(
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'echo "net-ftp/proftpd mysql" >> /etc/portage/package.use',
|
||||
'emerge -av proftpd',
|
||||
'touch /etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'chown root:0 /etc/proftpd/proftpd.conf',
|
||||
'chmod 0600 /etc/proftpd/proftpd.conf',
|
||||
'rc-update add proftpd default'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pureftpd' => Array(
|
||||
'pureftpd' => array(
|
||||
'label' => 'PureFTPD',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'emerge pure-ftpd'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_conf.d_pure-ftpd' => '/etc/conf.d/pure-ftpd',
|
||||
'etc_pureftpd-mysql.conf' => '/etc/pureftpd-mysql.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'chown root:0 /etc/conf.d/pure-ftpd',
|
||||
'chmod 0644 /etc/conf.d/pure-ftpd',
|
||||
'chown root:0 /etc/pureftpd-mysql.conf',
|
||||
'chmod 0600 /etc/pureftpd-mysql.conf',
|
||||
'rc-update add pure-ftpd default'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/pure-ftpd restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'etc' => Array(
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => Array(
|
||||
'cron' => Array(
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'emerge -av vixie-cron',
|
||||
'touch /etc/cron.d/froxlor',
|
||||
'chown root:0 /etc/cron.d/froxlor',
|
||||
'chmod 0640 /etc/cron.d/froxlor'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'rc-update add vixie-cron default'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/vixie-cron restart'
|
||||
)
|
||||
),
|
||||
'awstats' => Array(
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'emerge awstats',
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|\' '.makeCorrectFile($settings['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(
|
||||
'libnss' => array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'emerge -av libnss-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_libnss-mysql.cfg' => '/etc/libnss-mysql.cfg',
|
||||
'etc_libnss-mysql-root.cfg' => '/etc/libnss-mysql-root.cfg',
|
||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'chmod 600 /etc/libnss-mysql.cfg /etc/libnss-mysql-root.cfg',
|
||||
'rc-update add nscd default'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/nscd restart'
|
||||
)
|
||||
),
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
* @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['system']['vmail_uid']);
|
||||
$vmail_group=posix_getgrgid($settings['system']['vmail_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. */
|
||||
@@ -34,121 +34,121 @@ if ($vmail_group === false) {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return Array(
|
||||
'ubuntu_lucid' => Array(
|
||||
return array(
|
||||
'ubuntu_lucid' => array(
|
||||
'label' => 'Ubuntu 10.04 (Lucid)',
|
||||
'services' => Array(
|
||||
'http' => Array(
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => Array(
|
||||
'apache2' => Array(
|
||||
'daemons' => array(
|
||||
'apache2' => array(
|
||||
'label' => 'Apache 2',
|
||||
'commands' => Array(
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'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['phpfpm']['enabled'] == 1) ?
|
||||
Array(
|
||||
'etc_apache2_mods-enabled_fastcgi.conf' => '/etc/apache2/mods-enabled/fastcgi.conf'
|
||||
)
|
||||
:
|
||||
null,
|
||||
'restart' => Array(
|
||||
'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(
|
||||
'lighttpd' => array(
|
||||
'label' => 'Lighttpd Webserver',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install lighttpd',
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf',
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
),
|
||||
),
|
||||
'nginx' => Array(
|
||||
'nginx' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install nginx php5-cgi',
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_nginx_nginx.conf' => '/etc/nginx/nginx.conf',
|
||||
'etc_init.d_php-fcgi' => '/etc/init.d/php-fcgi'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'rm /etc/nginx/sites-enabled/default',
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
'mkdir -p ' . $settings['system']['deactivateddocroot'],
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/php-fcgi start',
|
||||
'/etc/init.d/nginx restart'
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
'dns' => Array(
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => Array(
|
||||
'bind' => Array(
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
)
|
||||
),
|
||||
'powerdns' => Array(
|
||||
'powerdns' => array(
|
||||
'label' => 'PowerDNS',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => Array(
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix_courier' => Array(
|
||||
'daemons' => array(
|
||||
'postfix_courier' => array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'commands' => Array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
|
||||
'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',
|
||||
@@ -170,7 +170,7 @@ return Array(
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0600 /etc/postfix/sasl/smtpd.conf',
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -178,38 +178,38 @@ return Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => Array(
|
||||
'dkim' => array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install dkim-filter',
|
||||
'mkdir -p /etc/postfix/dkim'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'dkim-filter.conf' => '/etc/dkim-filter.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/dkim-filter restart',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => Array(
|
||||
'postfix_dovecot' => array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => Array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
|
||||
'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',
|
||||
@@ -230,7 +230,7 @@ return Array(
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -238,106 +238,106 @@ return Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => Array(
|
||||
'exim4' => array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'dpkg-reconfigure exim4-config',
|
||||
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
|
||||
),
|
||||
'files' => Array(
|
||||
'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(
|
||||
'commands_2' => array(
|
||||
'chmod o-rx /var/lib/exim4',
|
||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/exim4 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => Array(
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => Array(
|
||||
'courier' => Array(
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install courier-pop courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
|
||||
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => Array(
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix'
|
||||
),
|
||||
'files' => Array(
|
||||
'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(
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => Array(
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => Array(
|
||||
'pure-ftpd' => array(
|
||||
'label' => 'Pure FTPd',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -349,50 +349,50 @@ return Array(
|
||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/pure-ftpd-mysql restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => Array(
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => Array(
|
||||
'cron' => Array(
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/cron restart'
|
||||
)
|
||||
),
|
||||
'awstats' => Array(
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'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'),
|
||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
|
||||
'rm /etc/cron.d/awstats'
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
'libnss' => array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install libnss-mysql nscd',
|
||||
'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf'
|
||||
),
|
||||
'files' => Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/nscd restart'
|
||||
)
|
||||
),
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
* @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['system']['vmail_uid']);
|
||||
$vmail_group=posix_getgrgid($settings['system']['vmail_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. */
|
||||
@@ -34,121 +34,121 @@ if ($vmail_group === false) {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return Array(
|
||||
'ubuntu_precise' => Array(
|
||||
return array(
|
||||
'ubuntu_precise' => array(
|
||||
'label' => 'Ubuntu 12.04 (Precise)',
|
||||
'services' => Array(
|
||||
'http' => Array(
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => Array(
|
||||
'apache2' => Array(
|
||||
'daemons' => array(
|
||||
'apache2' => array(
|
||||
'label' => 'Apache 2',
|
||||
'commands' => Array(
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'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['phpfpm']['enabled'] == 1) ?
|
||||
Array(
|
||||
'etc_apache2_mods-enabled_fastcgi.conf' => '/etc/apache2/mods-enabled/fastcgi.conf'
|
||||
)
|
||||
:
|
||||
null,
|
||||
'restart' => Array(
|
||||
'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(
|
||||
'lighttpd' => array(
|
||||
'label' => 'Lighttpd Webserver',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install lighttpd',
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf',
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
),
|
||||
),
|
||||
'nginx' => Array(
|
||||
'nginx' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install nginx php5-cgi',
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_nginx_nginx.conf' => '/etc/nginx/nginx.conf',
|
||||
'etc_init.d_php-fcgi' => '/etc/init.d/php-fcgi'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'rm /etc/nginx/sites-enabled/default',
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
'mkdir -p ' . $settings['system']['deactivateddocroot'],
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/php-fcgi start',
|
||||
'/etc/init.d/nginx restart'
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
'dns' => Array(
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => Array(
|
||||
'bind' => Array(
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
)
|
||||
),
|
||||
'powerdns' => Array(
|
||||
'powerdns' => array(
|
||||
'label' => 'PowerDNS',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => Array(
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix_courier' => Array(
|
||||
'daemons' => array(
|
||||
'postfix_courier' => array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'commands' => Array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
|
||||
'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',
|
||||
@@ -170,7 +170,7 @@ return Array(
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0600 /etc/postfix/sasl/smtpd.conf',
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -178,38 +178,38 @@ return Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => Array(
|
||||
'dkim' => array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install dkim-filter',
|
||||
'mkdir -p /etc/postfix/dkim'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'dkim-filter.conf' => '/etc/dkim-filter.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/dkim-filter restart',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => Array(
|
||||
'postfix_dovecot' => array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => Array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
|
||||
'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',
|
||||
@@ -230,7 +230,7 @@ return Array(
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -238,108 +238,108 @@ return Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => Array(
|
||||
'exim4' => array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'dpkg-reconfigure exim4-config',
|
||||
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
|
||||
),
|
||||
'files' => Array(
|
||||
'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(
|
||||
'commands_2' => array(
|
||||
'chmod o-rx /var/lib/exim4',
|
||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/exim4 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => Array(
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => Array(
|
||||
'courier' => Array(
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install courier-pop courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
|
||||
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => Array(
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix dovecot-mysql mail-stack-delivery'
|
||||
),
|
||||
'files' => Array(
|
||||
|
||||
'files' => array(
|
||||
|
||||
'etc_dovecot_conf.d_01_mail_stack_delivery.conf' => '/etc/dovecot/conf.d/01-mail-stack-delivery.conf',
|
||||
'etc_dovecot_conf.d_10_auth.conf' => '/etc/dovecot/conf.d/10-auth.conf',
|
||||
'etc_dovecot_conf.d_auth-sql.conf.ext' => '/etc/dovecot/conf.d/auth-sql.conf.ext',
|
||||
'etc_dovecot_dovecot-sql.conf.ext' => '/etc/dovecot/dovecot-sql.conf.ext'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf.ext'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => Array(
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => Array(
|
||||
'pure-ftpd' => array(
|
||||
'label' => 'Pure FTPd',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -351,50 +351,50 @@ return Array(
|
||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/pure-ftpd-mysql restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => Array(
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => Array(
|
||||
'cron' => Array(
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/cron restart'
|
||||
)
|
||||
),
|
||||
'awstats' => Array(
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'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'),
|
||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
|
||||
'rm /etc/cron.d/awstats'
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
'libnss' => array(
|
||||
'label' => 'libnss-bg (system login with mysql)',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install libnss-mysql-bg nscd',
|
||||
'chmod 600 /etc/libnss-mysql.cfg /etc/libnss-mysql-root.cfg'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_libnss-mysql.cfg' => '/etc/libnss-mysql.cfg',
|
||||
'etc_libnss-mysql-root.cfg' => '/etc/libnss-mysql-root.cfg',
|
||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/nscd restart'
|
||||
)
|
||||
),
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
|
||||
$vmail_group=posix_getgrgid($settings['system']['vmail_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. */
|
||||
@@ -34,52 +34,52 @@ if ($vmail_group === false) {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return Array(
|
||||
'sle_10' => Array(
|
||||
return array(
|
||||
'sle_10' => array(
|
||||
'label' => 'SUSE Linux Enterprise 10',
|
||||
'services' => Array(
|
||||
'http' => Array(
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => Array(
|
||||
'apache' => Array(
|
||||
'daemons' => array(
|
||||
'apache' => array(
|
||||
'label' => 'Apache',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['include'],
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : ''
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/apache2 restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'dns' => Array(
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => Array(
|
||||
'bind' => Array(
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => Array(
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown named:0 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/named restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => Array(
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix' => Array(
|
||||
'daemons' => array(
|
||||
'postfix' => array(
|
||||
'label' => 'Postfix',
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -87,11 +87,11 @@ return Array(
|
||||
'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['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
|
||||
'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',
|
||||
@@ -109,74 +109,74 @@ return Array(
|
||||
'chgrp postfix /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chgrp postfix /usr/lib/sasl2/smtpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => Array(
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => Array(
|
||||
'courier' => Array(
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_authlib_authdaemonrc' => '/etc/authlib/authdaemonrc',
|
||||
'etc_authlib_authmysqlrc' => '/etc/authlib/authmysqlrc'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'ftp' => Array(
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf',
|
||||
'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => Array(
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => Array(
|
||||
'cron' => Array(
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/cron restart'
|
||||
)
|
||||
),
|
||||
'awstats' => Array(
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'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'),
|
||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
|
||||
)
|
||||
)
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
|
||||
$vmail_group=posix_getgrgid($settings['system']['vmail_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. */
|
||||
@@ -34,121 +34,121 @@ if ($vmail_group === false) {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return Array(
|
||||
'debian_squeeze' => Array(
|
||||
return array(
|
||||
'debian_squeeze' => array(
|
||||
'label' => 'Debian 6.0 (Squeeze)',
|
||||
'services' => Array(
|
||||
'http' => Array(
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => Array(
|
||||
'apache2' => Array(
|
||||
'daemons' => array(
|
||||
'apache2' => array(
|
||||
'label' => 'Apache 2',
|
||||
'commands' => Array(
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'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['phpfpm']['enabled'] == 1) ?
|
||||
Array(
|
||||
'etc_apache2_mods-enabled_fastcgi.conf' => '/etc/apache2/mods-enabled/fastcgi.conf'
|
||||
)
|
||||
:
|
||||
null,
|
||||
'restart' => Array(
|
||||
'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(
|
||||
'lighttpd' => array(
|
||||
'label' => 'Lighttpd Webserver',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install lighttpd',
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf',
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
)
|
||||
),
|
||||
'nginx' => Array(
|
||||
'nginx' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install nginx php5-cgi',
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_nginx_nginx.conf' => '/etc/nginx/nginx.conf',
|
||||
'etc_init.d_php-fcgi' => '/etc/init.d/php-fcgi'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'rm /etc/nginx/sites-enabled/default',
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
//'mkdir -p ' . $settings['system']['deactivateddocroot'],
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
//'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/php-fcgi start',
|
||||
'/etc/init.d/nginx restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'dns' => Array(
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => Array(
|
||||
'bind' => Array(
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
)
|
||||
),
|
||||
'powerdns' => Array(
|
||||
'powerdns' => array(
|
||||
'label' => 'PowerDNS',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||
'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf',
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => Array(
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix_courier' => Array(
|
||||
'daemons' => array(
|
||||
'postfix_courier' => array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'commands' => Array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' '.$vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
|
||||
'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',
|
||||
@@ -170,7 +170,7 @@ return Array(
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0600 /etc/postfix/sasl/smtpd.conf',
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -178,38 +178,38 @@ return Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => Array(
|
||||
'dkim' => array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install dkim-filter',
|
||||
'mkdir -p /etc/postfix/dkim'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'dkim-filter.conf' => '/etc/dkim-filter.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/dkim-filter restart',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => Array(
|
||||
'postfix_dovecot' => array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => Array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . $settings['system']['vmail_homedir'],
|
||||
'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',
|
||||
@@ -230,7 +230,7 @@ return Array(
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -238,105 +238,105 @@ return Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart',
|
||||
'newaliases'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => Array(
|
||||
'exim4' => array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'dpkg-reconfigure exim4-config',
|
||||
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
|
||||
),
|
||||
'files' => Array(
|
||||
'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(
|
||||
'commands_2' => array(
|
||||
'chmod o-rx /var/lib/exim4',
|
||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/exim4 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => Array(
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => Array(
|
||||
'courier' => Array(
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install courier-pop courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
|
||||
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => Array(
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install dovecot-imapd dovecot-pop3d'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => Array(
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => Array(
|
||||
'pure-ftpd' => array(
|
||||
'label' => 'Pure FTPd',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -348,50 +348,50 @@ return Array(
|
||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/pure-ftpd-mysql restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => Array(
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => Array(
|
||||
'cron' => Array(
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/cron restart'
|
||||
)
|
||||
),
|
||||
'awstats' => Array(
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'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'),
|
||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
|
||||
'rm /etc/cron.d/awstats'
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
'libnss' => array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install libnss-mysql nscd',
|
||||
'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf'
|
||||
),
|
||||
'files' => Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/nscd restart'
|
||||
)
|
||||
),
|
||||
|
||||
@@ -10,16 +10,16 @@
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Andrej Semen <asemen@suse.de> (2010-2011)
|
||||
* @author Wolfgang Rosenauer <wr@rosenauer.org> (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['system']['vmail_uid']);
|
||||
$vmail_group=posix_getgrgid($settings['system']['vmail_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. */
|
||||
@@ -34,61 +34,61 @@ if ($vmail_group === false) {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return Array(
|
||||
'opensuse_11_x' => Array(
|
||||
return array(
|
||||
'opensuse_11_x' => array(
|
||||
'label' => 'openSUSE 11.x',
|
||||
'services' => Array(
|
||||
'http' => Array(
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => Array(
|
||||
'apache' => Array(
|
||||
'daemons' => array(
|
||||
'apache' => array(
|
||||
'label' => 'Apache',
|
||||
'commands' => Array(
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
'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['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : ''
|
||||
'Alias /mail /srv/www/htdocs/roundcubemail',
|
||||
'Alias /webmail /srv/www/htdocs/squirrelmail',
|
||||
(Settings::Get('system.deactivateddocroot') != '') ? 'mkdir -p ' . Settings::Get('system.deactivateddocroot') : ''
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
' '.
|
||||
'/etc/init.d/apache2 restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'dns' => Array(
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => Array(
|
||||
'bind' => Array(
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'Add froxlor_bind.conf to the NAMED_CONF_INCLUDE_FILES in /etc/sysconfig/named'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/named restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => Array(
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix' => Array(
|
||||
'daemons' => array(
|
||||
'postfix' => array(
|
||||
'label' => 'Postfix',
|
||||
'files' => Array(
|
||||
'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['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . $settings['system']['vmail_homedir'],
|
||||
'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',
|
||||
@@ -103,159 +103,159 @@ return Array(
|
||||
'chgrp postfix /etc/postfix/mysql_virtual_mailbox_maps.cf',
|
||||
'chgrp postfix /etc/sasl2/smtpd.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => Array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => Array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['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['system']['vmail_homedir'],
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['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'
|
||||
)
|
||||
'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'
|
||||
)
|
||||
)
|
||||
'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(
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => Array(
|
||||
'courier' => Array(
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'zypper install courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_authlib_authdaemonrc' => '/etc/authlib/authdaemonrc',
|
||||
'etc_authlib_authmysqlrc' => '/etc/authlib/authmysqlrc'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => Array(
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot 1.1',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'zypper install dovecot11'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
||||
'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/dovecot/dovecot-sql.conf'
|
||||
|
||||
),
|
||||
'restart' => Array(
|
||||
'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'
|
||||
)
|
||||
),
|
||||
'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(
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => Array(
|
||||
'cron' => Array(
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/cron restart'
|
||||
)
|
||||
),
|
||||
'awstats' => Array(
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'cp /usr/share/doc/packages/awstats/awstats.model.conf /etc/awstats/',
|
||||
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile(Settings::Get('system.awstats_conf').'/awstats.model.conf'),
|
||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself'
|
||||
)
|
||||
)
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
// Try to guess user/group from settings' email UID/GID
|
||||
$vmail_user=posix_getpwuid($settings['system']['vmail_uid']);
|
||||
$vmail_group=posix_getgrgid($settings['system']['vmail_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. */
|
||||
@@ -32,121 +32,121 @@ if ($vmail_group === false) {
|
||||
$vmail_groupname=$vmail_group['name'];
|
||||
}
|
||||
|
||||
return Array(
|
||||
'debian_wheezy' => Array(
|
||||
return array(
|
||||
'debian_wheezy' => array(
|
||||
'label' => 'Debian 7.0 (Wheezy)',
|
||||
'services' => Array(
|
||||
'http' => Array(
|
||||
'services' => array(
|
||||
'http' => array(
|
||||
'label' => $lng['admin']['configfiles']['http'],
|
||||
'daemons' => Array(
|
||||
'apache2' => Array(
|
||||
'daemons' => array(
|
||||
'apache2' => array(
|
||||
'label' => 'Apache 2',
|
||||
'commands' => Array(
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'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['phpfpm']['enabled'] == 1) ?
|
||||
Array(
|
||||
'etc_apache2_mods-enabled_fastcgi.conf' => '/etc/apache2/mods-enabled/fastcgi.conf'
|
||||
)
|
||||
:
|
||||
null,
|
||||
'restart' => Array(
|
||||
'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(
|
||||
'lighttpd' => array(
|
||||
'label' => 'Lighttpd Webserver',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install lighttpd',
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf',
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
$configcommand['vhost'],
|
||||
$configcommand['diroptions'],
|
||||
$configcommand['v_inclighty'],
|
||||
$configcommand['d_inclighty'],
|
||||
'lighty-disable-mod cgi',
|
||||
'lighty-disable-mod fastcgi',
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
($settings['system']['deactivateddocroot'] != '') ? 'mkdir -p ' . $settings['system']['deactivateddocroot'] : '',
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir']
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/lighttpd restart'
|
||||
)
|
||||
),
|
||||
'nginx' => Array(
|
||||
'nginx' => array(
|
||||
'label' => 'Nginx Webserver',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install nginx php5-cgi',
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_nginx_nginx.conf' => '/etc/nginx/nginx.conf',
|
||||
'etc_init.d_php-fcgi' => '/etc/init.d/php-fcgi'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'rm /etc/nginx/sites-enabled/default',
|
||||
'mkdir -p ' . $settings['system']['documentroot_prefix'],
|
||||
'mkdir -p ' . $settings['system']['logfiles_directory'],
|
||||
//'mkdir -p ' . $settings['system']['deactivateddocroot'],
|
||||
'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'],
|
||||
'mkdir -p ' . Settings::Get('system.documentroot_prefix'),
|
||||
'mkdir -p ' . Settings::Get('system.logfiles_directory'),
|
||||
//'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/php-fcgi start',
|
||||
'/etc/init.d/nginx restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'dns' => Array(
|
||||
'dns' => array(
|
||||
'label' => $lng['admin']['configfiles']['dns'],
|
||||
'daemons' => Array(
|
||||
'bind' => Array(
|
||||
'daemons' => array(
|
||||
'bind' => array(
|
||||
'label' => 'Bind9',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install bind9',
|
||||
'echo "include \"' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf\";" >> /etc/bind/named.conf.local',
|
||||
'touch ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chown root:bind ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf',
|
||||
'chmod 0644 ' . $settings['system']['bindconf_directory'] . 'froxlor_bind.conf'
|
||||
'echo "include \"' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf\";" >> /etc/bind/named.conf.local',
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/bind9 restart'
|
||||
)
|
||||
),
|
||||
'powerdns' => Array(
|
||||
'powerdns' => array(
|
||||
'label' => 'PowerDNS',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf',
|
||||
'etc_powerdns_bindbackend.conf' => '/etc/powerdns/bindbackend.conf',
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/pdns restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'smtp' => Array(
|
||||
'smtp' => array(
|
||||
'label' => $lng['admin']['configfiles']['smtp'],
|
||||
'daemons' => Array(
|
||||
'postfix_courier' => Array(
|
||||
'daemons' => array(
|
||||
'postfix_courier' => array(
|
||||
'label' => 'Postfix/Courier',
|
||||
'commands' => Array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' '.$vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R '.$vmail_username.':'.$vmail_groupname.' ' . $settings['system']['vmail_homedir'],
|
||||
'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',
|
||||
@@ -168,7 +168,7 @@ return Array(
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'chmod 0600 /etc/postfix/sasl/smtpd.conf',
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -177,38 +177,38 @@ return Array(
|
||||
'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf',
|
||||
'etc_aliases' => '/etc/aliases'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'dkim' => Array(
|
||||
'dkim' => array(
|
||||
'label' => 'DomainKey filter',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install opendkim',
|
||||
'mkdir -p /etc/postfix/dkim'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'opendkim.conf' => '/etc/opendkim.conf'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'echo "milter_default_action = accept" >> /etc/postfix/main.cf',
|
||||
'echo "milter_protocol = 6" >> /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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/opendkim restart',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_dovecot' => Array(
|
||||
'postfix_dovecot' => array(
|
||||
'label' => 'Postfix/Dovecot',
|
||||
'commands' => Array(
|
||||
($vmail_group === false) ? 'groupadd -g ' . $settings['system']['vmail_gid'] . ' ' . $vmail_groupname : '',
|
||||
($vmail_user === false) ? 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g ' . $vmail_groupname . ' ' . $vmail_username : '',
|
||||
'mkdir -p ' . $settings['system']['vmail_homedir'],
|
||||
'chown -R ' . $vmail_username . ':' . $vmail_groupname . ' ' . $settings['system']['vmail_homedir'],
|
||||
'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',
|
||||
@@ -229,7 +229,7 @@ return Array(
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf',
|
||||
'chmod 0640 /etc/postfix/mysql-virtual_sender_permissions.cf'
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -238,70 +238,70 @@ return Array(
|
||||
'etc_postfix_mysql-virtual_sender_permissions.cf' => '/etc/postfix/mysql-virtual_sender_permissions.cf',
|
||||
'etc_aliases' => '/etc/aliases'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'newaliases',
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'postfix_mxaccess' => Array(
|
||||
'postfix_mxaccess' => array(
|
||||
'label' => 'Postfix MX-Access (anti spam)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_postfix_mx_access' => '/etc/postfix/mx_access',
|
||||
'etc_postfix_main.cf' => '/etc/postfix/main.cf'
|
||||
),
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'postmap /etc/postfix/mx_access'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/postfix restart'
|
||||
)
|
||||
),
|
||||
'exim4' => Array(
|
||||
'exim4' => array(
|
||||
'label' => 'Exim4',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'dpkg-reconfigure exim4-config',
|
||||
'# choose "no configuration at this time" and "splitted configuration files" in the dialog'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt',
|
||||
'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(
|
||||
'commands_2' => array(
|
||||
'chmod o-rx /var/lib/exim4',
|
||||
'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/exim4 restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'mail' => Array(
|
||||
'mail' => array(
|
||||
'label' => $lng['admin']['configfiles']['mail'],
|
||||
'daemons' => Array(
|
||||
'courier' => Array(
|
||||
'daemons' => array(
|
||||
'courier' => array(
|
||||
'label' => 'Courier',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install courier-pop courier-imap courier-authlib-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc',
|
||||
'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/courier-authdaemon restart',
|
||||
'/etc/init.d/courier-pop restart'
|
||||
)
|
||||
),
|
||||
'dovecot' => Array(
|
||||
'dovecot' => array(
|
||||
'label' => 'Dovecot',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install dovecot-imapd dovecot-pop3d dovecot-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_dovecot_conf.d_10-auth.conf' => '/etc/dovecot/conf.d/10-auth.conf',
|
||||
'etc_dovecot_conf.d_10-mail.conf' => '/etc/dovecot/conf.d/10-mail.conf',
|
||||
'etc_dovecot_conf.d_10-master.conf' => '/etc/dovecot/conf.d/10-master.conf',
|
||||
@@ -311,35 +311,35 @@ return Array(
|
||||
'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf',
|
||||
'etc_dovecot_dovecot-sql.conf.ext' => '/etc/dovecot/dovecot-sql.conf.ext'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/dovecot restart'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'ftp' => Array(
|
||||
'ftp' => array(
|
||||
'label' => $lng['admin']['configfiles']['ftp'],
|
||||
'daemons' => Array(
|
||||
'proftpd' => Array(
|
||||
'daemons' => array(
|
||||
'proftpd' => array(
|
||||
'label' => 'ProFTPd',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install proftpd-basic proftpd-mod-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'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(
|
||||
'restart' => array(
|
||||
'/etc/init.d/proftpd restart'
|
||||
)
|
||||
),
|
||||
'pure-ftpd' => Array(
|
||||
'pure-ftpd' => array(
|
||||
'label' => 'Pure FTPd',
|
||||
'commands_1' => Array(
|
||||
'commands_1' => array(
|
||||
'apt-get install pure-ftpd-common pure-ftpd-mysql'
|
||||
),
|
||||
'files' => Array(
|
||||
'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',
|
||||
@@ -351,50 +351,50 @@ return Array(
|
||||
'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind',
|
||||
'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common'
|
||||
),
|
||||
'commands_2' => Array(
|
||||
'commands_2' => array(
|
||||
'chmod 0640 /etc/pure-ftpd/db/mysql.conf'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/pure-ftpd-mysql restart'
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
'etc' => Array(
|
||||
'etc' => array(
|
||||
'label' => $lng['admin']['configfiles']['etc'],
|
||||
'daemons' => Array(
|
||||
'cron' => Array(
|
||||
'daemons' => array(
|
||||
'cron' => array(
|
||||
'label' => 'Crond (cronscript)',
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_cron.d_froxlor' => '/etc/cron.d/froxlor'
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/cron restart'
|
||||
)
|
||||
),
|
||||
'awstats' => Array(
|
||||
'awstats' => array(
|
||||
'label' => 'Awstats',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install awstats',
|
||||
'cp /usr/share/awstats/tools/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
|
||||
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
||||
'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'),
|
||||
'# Please make sure you deactivate awstats own cronjob as Froxlor handles that itself',
|
||||
'rm /etc/cron.d/awstats'
|
||||
),
|
||||
),
|
||||
'libnss' => Array(
|
||||
'libnss' => array(
|
||||
'label' => 'libnss (system login with mysql)',
|
||||
'commands' => Array(
|
||||
'commands' => array(
|
||||
'apt-get install libnss-mysql-bg nscd',
|
||||
'chmod 600 /etc/libnss-mysql.cfg /etc/libnss-mysql-root.cfg'
|
||||
),
|
||||
'files' => Array(
|
||||
'files' => array(
|
||||
'etc_libnss-mysql.cfg' => '/etc/libnss-mysql.cfg',
|
||||
'etc_libnss-mysql-root.cfg' => '/etc/libnss-mysql-root.cfg',
|
||||
'etc_nsswitch.conf' => '/etc/nsswitch.conf',
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/nscd restart'
|
||||
)
|
||||
),
|
||||
@@ -418,14 +418,14 @@ return Array(
|
||||
'commands' => array(
|
||||
'apt-get install apache2-suexec libapache2-mod-fcgid php5-cgi',
|
||||
'a2enmod suexec fcgid',
|
||||
($settings['system']['mod_fcgid_ownvhost'] == '1') ? 'groupadd -f '.$settings['system']['mod_fcgid_httpgroup'] : null,
|
||||
($settings['system']['mod_fcgid_ownvhost'] == '1') ? 'useradd -s /bin/false -g '.$settings['system']['mod_fcgid_httpgroup'].' '.$settings['system']['mod_fcgid_httpuser'] : null,
|
||||
($settings['system']['mod_fcgid_ownvhost'] == '1') ? 'chown -R '.$settings['system']['mod_fcgid_httpuser'].':'.$settings['system']['mod_fcgid_httpgroup'].' '.FROXLOR_INSTALL_DIR : null,
|
||||
($settings['system']['mod_fcgid_ownvhost'] == '1') ? 'mkdir -p '.makeCorrectDir($settings['system']['mod_fcgid_configdir']) : null,
|
||||
($settings['system']['mod_fcgid_ownvhost'] == '1') ? 'mkdir -p '.makeCorrectDir($settings['system']['mod_fcgid_tmpdir']) : null,
|
||||
($settings['system']['mod_fcgid_ownvhost'] == '1') ? 'a2dismod php5' : null
|
||||
(Settings::Get('system.mod_fcgid_ownvhost') == '1') ? 'groupadd -f '.Settings::Get('system.mod_fcgid_httpgroup') : null,
|
||||
(Settings::Get('system.mod_fcgid_ownvhost') == '1') ? 'useradd -s /bin/false -g '.Settings::Get('system.mod_fcgid_httpgroup').' '.Settings::Get('system.mod_fcgid_httpuser') : null,
|
||||
(Settings::Get('system.mod_fcgid_ownvhost') == '1') ? 'chown -R '.Settings::Get('system.mod_fcgid_httpuser').':'.Settings::Get('system.mod_fcgid_httpgroup').' '.FROXLOR_INSTALL_DIR : null,
|
||||
(Settings::Get('system.mod_fcgid_ownvhost') == '1') ? 'mkdir -p '.makeCorrectDir(Settings::Get('system.mod_fcgid_configdir')) : null,
|
||||
(Settings::Get('system.mod_fcgid_ownvhost') == '1') ? 'mkdir -p '.makeCorrectDir(Settings::Get('system.mod_fcgid_tmpdir')) : null,
|
||||
(Settings::Get('system.mod_fcgid_ownvhost') == '1') ? 'a2dismod php5' : null
|
||||
),
|
||||
'restart' => Array(
|
||||
'restart' => array(
|
||||
'/etc/init.d/apache2 restart'
|
||||
)
|
||||
),
|
||||
@@ -437,10 +437,10 @@ return Array(
|
||||
'apt-get install apache2-suexec libapache2-mod-fastcgi php5-fpm',
|
||||
'rm /etc/php5/fpm/pool.d/www.conf',
|
||||
'a2enmod suexec fastcgi actions',
|
||||
($settings['phpfpm']['enabled_ownvhost'] == '1') ? 'groupadd -f '.$settings['phpfpm']['vhost_httpgroup'] : null,
|
||||
($settings['phpfpm']['enabled_ownvhost'] == '1') ? 'useradd -s /bin/false -g '.$settings['phpfpm']['vhost_httpgroup'].' '.$settings['phpfpm']['vhost_httpuser'] : null,
|
||||
($settings['phpfpm']['enabled_ownvhost'] == '1') ? 'chown -R '.$settings['phpfpm']['vhost_httpuser'].':'.$settings['phpfpm']['vhost_httpgroup'].' '.FROXLOR_INSTALL_DIR : null,
|
||||
($settings['phpfpm']['enabled_ownvhost'] == '1') ? 'a2dismod php5' : null
|
||||
(Settings::Get('phpfpm.enabled_ownvhost') == '1') ? 'groupadd -f '.Settings::Get('phpfpm.vhost_httpgroup') : null,
|
||||
(Settings::Get('phpfpm.enabled_ownvhost') == '1') ? 'useradd -s /bin/false -g '.Settings::Get('phpfpm.vhost_httpgroup').' '.Settings::Get('phpfpm.vhost_httpuser') : null,
|
||||
(Settings::Get('phpfpm.enabled_ownvhost') == '1') ? 'chown -R '.Settings::Get('phpfpm.vhost_httpuser').':'.Settings::Get('phpfpm.vhost_httpgroup').' '.FROXLOR_INSTALL_DIR : null,
|
||||
(Settings::Get('phpfpm.enabled_ownvhost') == '1') ? 'a2dismod php5' : null
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user