diff options
Diffstat (limited to 'syscp/patches/gentoo-config-files/bind/syscp-1.2.13-gentoo-admin_configfiles.php-bind')
-rw-r--r-- | syscp/patches/gentoo-config-files/bind/syscp-1.2.13-gentoo-admin_configfiles.php-bind | 286 |
1 files changed, 0 insertions, 286 deletions
diff --git a/syscp/patches/gentoo-config-files/bind/syscp-1.2.13-gentoo-admin_configfiles.php-bind b/syscp/patches/gentoo-config-files/bind/syscp-1.2.13-gentoo-admin_configfiles.php-bind deleted file mode 100644 index ff64f20..0000000 --- a/syscp/patches/gentoo-config-files/bind/syscp-1.2.13-gentoo-admin_configfiles.php-bind +++ /dev/null @@ -1,286 +0,0 @@ -<?php -/** - * filename: $Source: /syscp/syscp/admin_configfiles.php,v $ - * begin: Wednesday, Sep 08, 2004 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. This program is distributed in the - * hope that it will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * @author Florian Lippert <flo@redenswert.de> - * @copyright (C) 2003-2004 Florian Lippert - * @package Panel - * @version $Id: admin_configfiles.php,v 1.9 2005/06/15 13:53:58 flo Exp $ - * Modified to reflect the Gentoo environment by Luca Longinotti <chtekk@gentoo.org> - */ - - define('AREA', 'admin'); - - /** - * Include our init.php, which manages Sessions, Language etc. - */ - require("./lib/init.php"); - - - $configfiles = Array - ( - 'gentoo' => Array - ( - 'label' => 'Gentoo', - 'daemons' => Array - ( - 'apache' => Array - ( - 'label' => 'Apache2 Webserver (HTTP)', - 'commands' => Array - ( - 'touch '.$settings['system']['apacheconf_directory'].'vhosts.d/99_syscp-vhosts.conf', - 'chown root:0 '.$settings['system']['apacheconf_directory'].'vhosts.d/99_syscp-vhosts.conf', - 'chmod 0600 '.$settings['system']['apacheconf_directory'].'vhosts.d/99_syscp-vhosts.conf', - 'echo "Include '.$settings['system']['apacheconf_directory'].'vhosts.d/99_syscp-vhosts.conf" >> /etc/apache2/httpd.conf', - 'mkdir -p '.$settings['system']['documentroot_prefix'], - 'mkdir -p '.$settings['system']['logfiles_directory'] - ), - 'restart' => Array - ( - 'rc-update add apache2 default', - '/etc/init.d/apache2 restart' - ) - ), - 'bind' => Array - ( - 'label' => 'Bind9 Nameserver (DNS)', - 'files' => Array - ( - 'etc_bind_default.zone' => '/etc/bind/default.zone' - ), - 'commands' => Array - ( - 'echo "include \"'.$settings['system']['bindconf_directory'].'syscp_bind.conf\";" >> /etc/bind/named.conf', - 'touch '.$settings['system']['bindconf_directory'].'syscp_bind.conf', - 'chown root:0 '.$settings['system']['bindconf_directory'].'syscp_bind.conf', - 'chmod 0600 '.$settings['system']['bindconf_directory'].'syscp_bind.conf' - ), - 'restart' => Array - ( - 'rc-update add named default', - '/etc/init.d/named restart' - ) - ), - 'courier' => Array - ( - 'label' => 'Courier-IMAP (POP3/IMAP)', - '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', - 'etc_courier-imap_imapd' => '/etc/courier-imap/imapd', - 'etc_courier-imap_pop3d-ssl' => '/etc/courier-imap/pop3d-ssl', - 'etc_courier-imap_imapd-ssl' => '/etc/courier-imap/imapd-ssl' - ), - 'commands' => Array - ( - 'rm /etc/courier/authlib/authdaemonrc', - 'rm /etc/courier/authlib/authmysqlrc', - 'rm /etc/courier-imap/pop3d', - 'rm /etc/courier-imap/imapd', - 'rm /etc/courier-imap/pop3d-ssl', - 'rm /etc/courier-imap/imapd-ssl', - 'touch /etc/courier/authlib/authdaemonrc', - 'touch /etc/courier/authlib/authmysqlrc', - 'touch /etc/courier-imap/pop3d', - 'touch /etc/courier-imap/imapd', - 'touch /etc/courier-imap/pop3d-ssl', - 'touch /etc/courier-imap/imapd-ssl', - 'chown root:0 /etc/courier/authlib/authdaemonrc', - 'chown root:0 /etc/courier/authlib/authmysqlrc', - 'chown root:0 /etc/courier-imap/pop3d', - 'chown root:0 /etc/courier-imap/imapd', - 'chown root:0 /etc/courier-imap/pop3d-ssl', - 'chown root:0 /etc/courier-imap/imapd-ssl', - 'chmod 0600 /etc/courier/authlib/authdaemonrc', - 'chmod 0600 /etc/courier/authlib/authmysqlrc', - 'chmod 0600 /etc/courier-imap/pop3d', - 'chmod 0600 /etc/courier-imap/imapd', - 'chmod 0600 /etc/courier-imap/pop3d-ssl', - 'chmod 0600 /etc/courier-imap/imapd-ssl' - ), - 'restart' => Array - ( - 'rc-update add courier-authlib default', - 'rc-update add courier-pop3d default', - 'rc-update add courier-imapd default', - '/etc/init.d/courier-authlib restart', - '/etc/init.d/courier-pop3d restart', - '/etc/init.d/courier-imapd restart' - ) - ), - 'postfix' => Array - ( - 'label' => 'Postfix (MTA)', - '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 - ( - 'mkdir -p '.$settings['system']['vmail_homedir'], - 'chown -R vmail:vmail '.$settings['system']['vmail_homedir'], - 'chmod 0750 '.$settings['system']['vmail_homedir'], - 'rm /etc/postfix/main.cf', - 'touch /etc/postfix/main.cf', - 'touch /etc/postfix/master.cf', - 'touch /etc/postfix/mysql-virtual_alias_maps.cf', - 'touch /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'touch /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'touch /etc/sasl2/smtpd.conf', - 'chown root:0 /etc/postfix/main.cf', - 'chown root:0 /etc/postfix/master.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'chown root:0 /etc/sasl2/smtpd.conf', - 'chmod 0600 /etc/postfix/main.cf', - 'chmod 0600 /etc/postfix/master.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'chmod 0600 /etc/sasl2/smtpd.conf' - ), - 'restart' => Array - ( - 'rc-update add postfix default', - '/etc/init.d/postfix restart' - ) - ), - 'proftpd' => Array - ( - 'label' => 'ProFTPd (FTP)', - 'files' => Array - ( - 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' - ), - 'commands' => Array - ( - 'touch /etc/proftpd/proftpd.conf', - 'chown root:0 /etc/proftpd/proftpd.conf', - 'chmod 0600 /etc/proftpd/proftpd.conf' - ), - 'restart' => Array - ( - 'rc-update add proftpd default', - '/etc/init.d/proftpd restart' - ) - ), - 'cron' => Array - ( - 'label' => 'Crond (cronscript)', - 'files' => Array - ( - 'etc_php_syscp-cronjob_php.ini' => '/etc/php/syscp-cronjob/php.ini', - 'etc_cron.d_syscp' => '/etc/cron.d/syscp' - ), - 'commands' => Array - ( - 'touch /etc/cron.d/syscp', - 'chown root:0 /etc/cron.d/syscp', - 'chmod 0640 /etc/cron.d/syscp', - 'mkdir -p /etc/php/syscp-cronjob', - 'touch /etc/php/syscp-cronjob/php.ini', - 'chown -R root:0 /etc/php/syscp-cronjob', - 'chmod 0750 /etc/php/syscp-cronjob', - 'chmod 0640 /etc/php/syscp-cronjob/php.ini' - ), - 'restart' => Array - ( - 'rc-update add vixie-cron default', - '/etc/init.d/vixie-cron restart' - ) - ) - ) - ) - ); - - /*echo '<pre>'; - print_r($configfiles); - echo '</pre>';*/ - - if( ($page == 'configfiles' || $page == 'overview') && $userinfo['change_serversettings'] == '1') - { - if(isset($_GET['distribution']) && $_GET['distribution']!='' && isset($configfiles[$_GET['distribution']]) && is_array($configfiles[$_GET['distribution']]) && - isset($_GET['daemon']) && $_GET['daemon']!='' && isset($configfiles[$_GET['distribution']]['daemons'][$_GET['daemon']]) && is_array($configfiles[$_GET['distribution']]['daemons'][$_GET['daemon']])) - { - $distribution = addslashes($_GET['distribution']); - $daemon = addslashes($_GET['daemon']); - - if(isset($configfiles[$distribution]['daemons'][$daemon]['commands']) && is_array($configfiles[$distribution]['daemons'][$daemon]['commands'])) - { - $commands = implode("\n", $configfiles[$distribution]['daemons'][$daemon]['commands']); - } - else - { - $commands = ''; - } - - $replace_arr = Array - ( - '<SQL_UNPRIVILEGED_USER>' => $sql['user'], - '<SQL_UNPRIVILEGED_PASSWORD>' => 'MYSQL_PASSWORD', - '<SQL_DB>' => $sql['db'], - '<SQL_HOST>' => $sql['host'], - '<SERVERNAME>' => $settings['system']['hostname'], - '<SERVERIP>' => $settings['system']['ipaddress'], - '<VIRTUAL_MAILBOX_BASE>' => $settings['system']['vmail_homedir'], - '<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'], - '<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'] - ); - $files = ''; - if(isset($configfiles[$distribution]['daemons'][$daemon]['files']) && is_array($configfiles[$distribution]['daemons'][$daemon]['files'])) - { - while(list($filename, $realname) = each($configfiles[$distribution]['daemons'][$daemon]['files'])) - { - $file_content = implode('', file('./templates/misc/configfiles/'.$distribution.'/'.$daemon.'/'.$filename)); - $file_content = strtr($file_content, $replace_arr); - $file_content = htmlspecialchars($file_content); - $numbrows = count(explode("\n", $file_content)); - eval("\$files.=\"".getTemplate("configfiles/configfiles_file")."\";"); - } - } - - if(isset($configfiles[$distribution]['daemons'][$daemon]['restart']) && is_array($configfiles[$distribution]['daemons'][$daemon]['restart'])) - { - $restart = implode("\n", $configfiles[$distribution]['daemons'][$daemon]['restart']); - } - else - { - $restart = ''; - } - - eval("echo \"".getTemplate("configfiles/configfiles")."\";"); - } - else - { - $distributions = ''; - while (list($distribution_name, $distribution_details) = each($configfiles)) - { - $daemons = ''; - while(list($daemon_name, $daemon_details) = each($distribution_details['daemons'])) - { - eval("\$daemons.=\"".getTemplate("configfiles/choose_daemon")."\";"); - } - eval("\$distributions.=\"".getTemplate("configfiles/choose_distribution")."\";"); - } - eval("echo \"".getTemplate("configfiles/choose")."\";"); - } - } - -?> |