diff --git a/docs/autoinstall_samples/autoinstall.conf_sample.php b/docs/autoinstall_samples/autoinstall.conf_sample.php
index c7b5393758d212651511a1bc42a3ad2c80e83ead..922664629f93bf66f7ac4adb0d53e1d8c1c24f2a 100644
--- a/docs/autoinstall_samples/autoinstall.conf_sample.php
+++ b/docs/autoinstall_samples/autoinstall.conf_sample.php
@@ -58,7 +58,6 @@ $autoupdate['svc_detect_change_mail_server'] = 'yes'; // yes (default), no
$autoupdate['svc_detect_change_web_server'] = 'yes'; // yes (default), no
$autoupdate['svc_detect_change_dns_server'] = 'yes'; // yes (default), no
$autoupdate['svc_detect_change_firewall_server'] = 'yes'; // yes (default), no
-$autoupdate['svc_detect_change_vserver_server'] = 'yes'; // yes (default), no
$autoupdate['svc_detect_change_db_server'] = 'yes'; // yes (default), no
?>
\ No newline at end of file
diff --git a/helper_scripts/setup_in_openvz/diff_openssl.cnf b/helper_scripts/setup_in_openvz/diff_openssl.cnf
deleted file mode 100644
index 4a3c7e6aa19504cb5f646cefe8c29ee57952826e..0000000000000000000000000000000000000000
--- a/helper_scripts/setup_in_openvz/diff_openssl.cnf
+++ /dev/null
@@ -1,25 +0,0 @@
-# diff openssl.cnf /usr/lib/ssl/openssl.cnf
-68c68
-< default_days = 3653 # how long to certify for
----
-> default_days = 365 # how long to certify for
-125c125
-< countryName_default = YOURCOUNTRY
----
-> countryName_default = AU
-130c130
-< stateOrProvinceName_default = YOURPROVINCE
----
-> stateOrProvinceName_default = Some-State
-135c135
-< 0.organizationName_default = YOURDOMAIN
----
-> 0.organizationName_default = Internet Widgits Pty Ltd
-142c142
-< organizationalUnitName_default = ISP
----
-> #organizationalUnitName_default =
-145d144
-< commonName_default = YOURHOSTNAME
-149d147
-< emailAddress_default = postmaster@YOURDOMAIN
diff --git a/helper_scripts/setup_in_openvz/install_server.sh b/helper_scripts/setup_in_openvz/install_server.sh
deleted file mode 100644
index 1cc05841703b3fe7cb268b4086ea90d8991a9261..0000000000000000000000000000000000000000
--- a/helper_scripts/setup_in_openvz/install_server.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-# Script to configuring an ispconfig3 server in a Debian VPS
-# by calocen [at] gmail [dot] com
-
-# getting some enviromment values
-myhostname=`hostname -f`
-mydomain=`hostname -d`
-myip=`hostname -i`
-[ ! -x /usr/bin/geoiplookup ] && apt-get --assume-yes install geoip-bin
-mycountry=`geoiplookup $myip | cut -f4 -d" " | cut -f1 -d","`
-myprovince=`geoiplookup $myip | cut -f5 -d" "`
-
-# reconfiguring webalizer, postfix
-# could be cool to modify here webalizer values
-dpkg-reconfigure -u webalizer
-postconf -e "myhostname = $myhostname"
-postconf -e "mydestination = $myhostname, localhost"
-echo $myhostname > /etc/mailname
-dpkg-reconfigure -u postfix
-
-# request new password
-oldpwd=`grep password /root/.my.cnf | tr "\t" " " | tr -s " " | cut -f3 -d" "`
-read -p "mysql password: [$oldpwd] " mysqlpwd
-[ -z $mysqlpwd ] && mysqlpwd=$oldpwd
-echo $mysqlpwd
-#read -p "Are you sure? (y/n) " sure
-## who said fear ##
-set -x
-mysqladmin -u root -p$oldpwd password $mysqlpwd
-mysqladmin -u root -p$mysqlpwd -h localhost password $mysqlpwd
-cat << EOF > /root/.my.cnf
-[client]
-password = $mysqlpwd
-EOF
-chmod 600 /root/.my.cnf
-
-# changing mydns password
-mysql -e "SET PASSWORD FOR 'mydns'@'%' = PASSWORD( '$mysqlpwd' )"
-mysql -e "SET PASSWORD FOR 'mydns'@'localhost' = PASSWORD( '$mysqlpwd' )"
-cp -ax /etc/mydns.conf /etc/mydns.conf~
-sed s/$oldpwd/$mysqlpwd/g < /etc/mydns.conf~ > /etc/mydns.conf
-
-# enabling mydns
-mydns --create-tables > /tmp/mydns.sql
-mysql -e "CREATE DATABASE IF NOT EXISTS mydns ; USE mydns ; SOURCE /tmp/mydns.sql;"
-rm /tmp/mydns.*
-invoke-rc.d mydns restart
-
-# preparing server installation
-mv /etc/ssl/openssl.cnf /etc/ssl/openssl.cnf~
-sed s/"YOURHOSTNAME"/"$myhostname"/g < /usr/local/bin/openssl.cnf |
-sed s/"YOURDOMAIN"/"$mydomain"/g | \
-sed s/"YOURCOUNTRY"/"$mycountry"/g | \
-sed s/"YOURPROVINCE"/"$myprovince"/g > /etc/ssl/openssl.cnf
-
-tar xfz /root/downloads/ISPConfig-3.0.0.7-beta.tar.gz -C /usr/local/src
-# here would be some stuff to update from SVN
-cd /usr/local/src/ispconfig3_install/install/
-php -q install.php
-
-
diff --git a/helper_scripts/setup_in_openvz/recreate_ssh_and_hostname.sh b/helper_scripts/setup_in_openvz/recreate_ssh_and_hostname.sh
deleted file mode 100644
index 72c2ab61a2779f8acaa69ae32225c89e31187862..0000000000000000000000000000000000000000
--- a/helper_scripts/setup_in_openvz/recreate_ssh_and_hostname.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-set -x
-echo "" > /etc/resolv.conf
-echo "" > /etc/hostname
-echo "" > /etc/mailname
-rm -f /etc/ssh/ssh_host_*
-cat << EOF > /etc/rc2.d/S15ssh_gen_host_keys
-#!/bin/bash
-ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N ''
-ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa -N ''
-dpkg-reconfigure -u webalizer
-postconf -e "myhostname = $(hostname -f)"
-postconf -e "mydestination = $(hostname -f), localhost"
-echo $(hostname -f) > /etc/mailname
-dpkg-reconfigure -u postfix
-rm -f \$0
-EOF
-chmod a+x /etc/rc2.d/S15ssh_gen_host_keys
diff --git a/install/dist/conf/centos70.conf.php b/install/dist/conf/centos70.conf.php
index eaf0ba61210c26cac2f763ea5332e879bbb59d49..638c19239dd4f78d1ac7bbbab2119207cc6acf80 100644
--- a/install/dist/conf/centos70.conf.php
+++ b/install/dist/conf/centos70.conf.php
@@ -50,7 +50,6 @@ $conf['services']['web'] = true;
$conf['services']['dns'] = true;
$conf['services']['file'] = true;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = true;
//* MySQL
$conf['mysql']['installed'] = false; // will be detected automatically during installation
@@ -193,8 +192,3 @@ $conf['vlogger']['config_dir'] = '/etc';
$conf['cron']['init_script'] = 'crond';
$conf['cron']['crontab_dir'] = '/etc/cron.d';
$conf['cron']['wget'] = '/usr/bin/wget';
-
-//* OpenVZ
-$conf['openvz']['installed'] = false;
-
-?>
diff --git a/install/dist/conf/centos72.conf.php b/install/dist/conf/centos72.conf.php
index 0d88bcfb7ee4f3b3b443e0a07843cd511d4de1f9..0e1bbec107c6f359704b968c90f516d1c9456caa 100644
--- a/install/dist/conf/centos72.conf.php
+++ b/install/dist/conf/centos72.conf.php
@@ -50,7 +50,6 @@ $conf['services']['web'] = true;
$conf['services']['dns'] = true;
$conf['services']['file'] = true;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = true;
//* MySQL
$conf['mysql']['installed'] = false; // will be detected automatically during installation
@@ -193,8 +192,3 @@ $conf['vlogger']['config_dir'] = '/etc';
$conf['cron']['init_script'] = 'crond';
$conf['cron']['crontab_dir'] = '/etc/cron.d';
$conf['cron']['wget'] = '/usr/bin/wget';
-
-//* OpenVZ
-$conf['openvz']['installed'] = false;
-
-?>
diff --git a/install/dist/conf/debian40.conf.php b/install/dist/conf/debian40.conf.php
index 0dcb1bffbb8ef32edf295713d7637525741420bf..9957c8ff5c1e730b114b309b266c47a6e6740b58 100644
--- a/install/dist/conf/debian40.conf.php
+++ b/install/dist/conf/debian40.conf.php
@@ -50,7 +50,6 @@ $conf['services']['web'] = true;
$conf['services']['dns'] = true;
$conf['services']['file'] = true;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = true;
$conf['services']['proxy'] = false;
$conf['services']['firewall'] = false;
@@ -200,9 +199,3 @@ $conf['vlogger']['config_dir'] = '/etc';
$conf['cron']['init_script'] = 'cron';
$conf['cron']['crontab_dir'] = '/etc/cron.d';
$conf['cron']['wget'] = '/usr/bin/wget';
-
-//* OpenVZ
-$conf['openvz']['installed'] = false;
-
-
-?>
diff --git a/install/dist/conf/debian60.conf.php b/install/dist/conf/debian60.conf.php
index adff0dcc7ff3b581d1ae315fcb49fb21eeeb949c..ba5073415e2b509a428e3d20fb8622e02daa6edc 100644
--- a/install/dist/conf/debian60.conf.php
+++ b/install/dist/conf/debian60.conf.php
@@ -50,7 +50,6 @@ $conf['services']['web'] = true;
$conf['services']['dns'] = true;
$conf['services']['file'] = true;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = true;
$conf['services']['proxy'] = false;
$conf['services']['firewall'] = false;
@@ -188,9 +187,6 @@ $conf['nginx']['php_fpm_pool_dir'] = '/etc/php5/fpm/pool.d';
$conf['nginx']['php_fpm_start_port'] = 9010;
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php5-fpm';
-//* OpenVZ
-$conf['openvz']['installed'] = false;
-
//*Bastille-Firwall
$conf['bastille']['installed'] = false;
$conf['bastille']['config_dir'] = '/etc/Bastille';
diff --git a/install/dist/conf/debian90.conf.php b/install/dist/conf/debian90.conf.php
index eb3c646f895c2939a88ef91155d0d134872ea18a..cea999b171a4b55b5703ac9f71d9b41a4f4d1a09 100644
--- a/install/dist/conf/debian90.conf.php
+++ b/install/dist/conf/debian90.conf.php
@@ -50,7 +50,6 @@ $conf['services']['web'] = true;
$conf['services']['dns'] = true;
$conf['services']['file'] = true;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = true;
$conf['services']['proxy'] = false;
$conf['services']['firewall'] = false;
@@ -188,9 +187,6 @@ $conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.0/fpm/pool.d';
$conf['nginx']['php_fpm_start_port'] = 9010;
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.0-fpm';
-//* OpenVZ
-$conf['openvz']['installed'] = false;
-
//*Bastille-Firwall
$conf['bastille']['installed'] = false;
$conf['bastille']['config_dir'] = '/etc/Bastille';
diff --git a/install/dist/conf/debiantesting.conf.php b/install/dist/conf/debiantesting.conf.php
index 60030bfdcecb3e86e1fe2a3e70485da4499f7494..f531b972ecaf480b9d3401567360453f919bd775 100644
--- a/install/dist/conf/debiantesting.conf.php
+++ b/install/dist/conf/debiantesting.conf.php
@@ -50,7 +50,6 @@ $conf['services']['web'] = true;
$conf['services']['dns'] = true;
$conf['services']['file'] = true;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = true;
$conf['services']['proxy'] = false;
$conf['services']['firewall'] = false;
@@ -188,9 +187,6 @@ $conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.0/fpm/pool.d';
$conf['nginx']['php_fpm_start_port'] = 9010;
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.0-fpm';
-//* OpenVZ
-$conf['openvz']['installed'] = false;
-
//*Bastille-Firwall
$conf['bastille']['installed'] = false;
$conf['bastille']['config_dir'] = '/etc/Bastille';
diff --git a/install/dist/conf/fedora9.conf.php b/install/dist/conf/fedora9.conf.php
index 20824f1e7ece42f5e19a5d2a2d5a98872e213e7a..ced8eca83d06021642b3d2438c56fb04e4aa2f1f 100644
--- a/install/dist/conf/fedora9.conf.php
+++ b/install/dist/conf/fedora9.conf.php
@@ -50,7 +50,6 @@ $conf['services']['web'] = true;
$conf['services']['dns'] = true;
$conf['services']['file'] = true;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = true;
//* MySQL
$conf['mysql']['installed'] = false; // will be detected automatically during installation
@@ -193,8 +192,3 @@ $conf['vlogger']['config_dir'] = '/etc';
$conf['cron']['init_script'] = 'crond';
$conf['cron']['crontab_dir'] = '/etc/cron.d';
$conf['cron']['wget'] = '/usr/bin/wget';
-
-//* OpenVZ
-$conf['openvz']['installed'] = false;
-
-?>
diff --git a/install/dist/conf/gentoo.conf.php b/install/dist/conf/gentoo.conf.php
index 585c1fc6629378a5b052be74df91796d71aca5b7..657bb4a64a93933e6f4d17d2b26b39ddc492936a 100644
--- a/install/dist/conf/gentoo.conf.php
+++ b/install/dist/conf/gentoo.conf.php
@@ -50,7 +50,6 @@ $conf['services']['web'] = true;
$conf['services']['dns'] = true;
$conf['services']['file'] = true;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = true;
//* MySQL
$conf['mysql']['installed'] = false; // will be detected automatically during installation
@@ -206,8 +205,3 @@ $conf['cron']['init_script'] = 'vixie-cron';
$conf['cron']['crontab_dir'] = '/etc/cron.d';
$conf['cron']['group'] = 'cron';
$conf['cron']['wget'] = '/usr/bin/wget';
-
-//* OpenVZ
-$conf['openvz']['installed'] = false;
-
-?>
diff --git a/install/dist/conf/opensuse112.conf.php b/install/dist/conf/opensuse112.conf.php
index 077f86718b8eff148e3d4448f8891324c3b2685b..323ed28df477ad3f2d6f142f861464e2ddca7a45 100644
--- a/install/dist/conf/opensuse112.conf.php
+++ b/install/dist/conf/opensuse112.conf.php
@@ -50,7 +50,6 @@ $conf['services']['web'] = true;
$conf['services']['dns'] = true;
$conf['services']['file'] = true;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = true;
//* MySQL
$conf['mysql']['installed'] = false; // will be detected automatically during installation
@@ -193,8 +192,3 @@ $conf['vlogger']['config_dir'] = '/etc';
$conf['cron']['init_script'] = 'cron';
$conf['cron']['crontab_dir'] = '/etc/cron.d';
$conf['cron']['wget'] = '/usr/bin/wget';
-
-//* OpenVZ
-$conf['openvz']['installed'] = false;
-
-?>
diff --git a/install/dist/conf/ubuntu1604.conf.php b/install/dist/conf/ubuntu1604.conf.php
index 2ef53324b0173a32ba02bf102174a523ad6a13d5..c65216ab68533136c02b34e5f6ba36ef0f3f0d8c 100644
--- a/install/dist/conf/ubuntu1604.conf.php
+++ b/install/dist/conf/ubuntu1604.conf.php
@@ -50,7 +50,6 @@ $conf['services']['web'] = true;
$conf['services']['dns'] = true;
$conf['services']['file'] = true;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = true;
$conf['services']['proxy'] = false;
$conf['services']['firewall'] = false;
@@ -188,9 +187,6 @@ $conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.0/fpm/pool.d';
$conf['nginx']['php_fpm_start_port'] = 9010;
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.0-fpm';
-//* OpenVZ
-$conf['openvz']['installed'] = false;
-
//*Bastille-Firwall
$conf['bastille']['installed'] = false;
$conf['bastille']['config_dir'] = '/etc/Bastille';
diff --git a/install/dist/conf/ubuntu1710.conf.php b/install/dist/conf/ubuntu1710.conf.php
index 555765b3b284af5845e9c50f6a0f1a3d82786493..490ee286864c607d05e4ca7cffbe91cea2fb2da3 100644
--- a/install/dist/conf/ubuntu1710.conf.php
+++ b/install/dist/conf/ubuntu1710.conf.php
@@ -50,7 +50,6 @@ $conf['services']['web'] = true;
$conf['services']['dns'] = true;
$conf['services']['file'] = true;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = true;
$conf['services']['proxy'] = false;
$conf['services']['firewall'] = false;
@@ -188,9 +187,6 @@ $conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.1/fpm/pool.d';
$conf['nginx']['php_fpm_start_port'] = 9010;
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.1-fpm';
-//* OpenVZ
-$conf['openvz']['installed'] = false;
-
//*Bastille-Firwall
$conf['bastille']['installed'] = false;
$conf['bastille']['config_dir'] = '/etc/Bastille';
diff --git a/install/dist/conf/ubuntu1804.conf.php b/install/dist/conf/ubuntu1804.conf.php
index 363014a98713a6700a44e62ca602c0d5d894e2fc..dfae088e742e5b81d4ef2ace0a151d9580db1ab8 100644
--- a/install/dist/conf/ubuntu1804.conf.php
+++ b/install/dist/conf/ubuntu1804.conf.php
@@ -50,7 +50,6 @@ $conf['services']['web'] = true;
$conf['services']['dns'] = true;
$conf['services']['file'] = true;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = true;
$conf['services']['proxy'] = false;
$conf['services']['firewall'] = false;
@@ -188,9 +187,6 @@ $conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.2/fpm/pool.d';
$conf['nginx']['php_fpm_start_port'] = 9010;
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.2-fpm';
-//* OpenVZ
-$conf['openvz']['installed'] = false;
-
//*Bastille-Firwall
$conf['bastille']['installed'] = false;
$conf['bastille']['config_dir'] = '/etc/Bastille';
diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index 10f6c3bf153f302997016c54ab4de5b5a6544042..a6b23e38422c51580c12af7163bf0298f8e3c244 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -972,12 +972,11 @@ class installer_dist extends installer_base {
$dns_server_enabled = ($conf['services']['dns'])?1:0;
$file_server_enabled = ($conf['services']['file'])?1:0;
$db_server_enabled = ($conf['services']['db'])?1:0;
- $vserver_server_enabled = ($conf['services']['vserver'])?1:0;
- $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ?, vserver_server = ? WHERE server_id = ?";
+ $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ? WHERE server_id = ?";
- $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']);
+ $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $conf['server_id']);
if($conf['mysql']['master_slave_setup'] == 'y') {
- $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']);
+ $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $conf['server_id']);
}
// chown install dir to root and chmod 755
diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index af936e8861937a0e8bf4d871e5578f8464d874cf..511ed69718a87ab99974ba70f1faf82001682420 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -905,13 +905,12 @@ class installer extends installer_base
$dns_server_enabled = ($conf['services']['dns'])?1:0;
$file_server_enabled = ($conf['services']['file'])?1:0;
$db_server_enabled = ($conf['services']['db'])?1:0;
- $vserver_server_enabled = ($conf['services']['vserver'])?1:0;
- $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ?, vserver_server = ? WHERE server_id = ?";
+ $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ? WHERE server_id = ?";
- $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']);
+ $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $conf['server_id']);
if($conf['mysql']['master_slave_setup'] == 'y') {
- $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']);
+ $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $conf['server_id']);
}
// chown install dir to root and chmod 755
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index d1866b34eddb301e2bdf1cdf850d3deeb4b00ce7..0688471cda1590d2d443f37184cf2a1d911b9801 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -980,12 +980,11 @@ class installer_dist extends installer_base {
$dns_server_enabled = ($conf['services']['dns'])?1:0;
$file_server_enabled = ($conf['services']['file'])?1:0;
$db_server_enabled = ($conf['services']['db'])?1:0;
- $vserver_server_enabled = ($conf['services']['vserver'])?1:0;
- $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ?, vserver_server = ? WHERE server_id = ?";
+ $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ? WHERE server_id = ?";
- $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']);
+ $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $conf['server_id']);
if($conf['mysql']['master_slave_setup'] == 'y') {
- $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']);
+ $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $conf['server_id']);
}
// chown install dir to root and chmod 755
diff --git a/install/install.php b/install/install.php
index adcff706b1081ed5b27a9734ff93e76e9d6df743..1199dedabc9ab225b1a1d8d53169f2e9211bd8c6 100644
--- a/install/install.php
+++ b/install/install.php
@@ -253,7 +253,6 @@ $conf['services']['web'] = false;
$conf['services']['dns'] = false;
$conf['services']['file'] = false;
$conf['services']['db'] = true;
-$conf['services']['vserver'] = false;
$conf['services']['firewall'] = false;
$conf['services']['proxy'] = false;
@@ -451,13 +450,6 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Web
}
}
-//* Configure OpenVZ
-$force = @($conf['openvz']['installed']) ? true : $inst->force_configure_app('OpenVZ', ($install_mode == 'expert'));
-if($force) {
- $conf['services']['vserver'] = true;
- swriteln('Configuring OpenVZ');
-}
-
if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Firewall Server', array('y', 'n'), 'y','configure_firewall')) == 'y') {
//* Check for Firewall
if(!$conf['ufw']['installed'] && !$conf['firewall']['installed']) {
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 46608c22623a0cea37b6629ae3c0f95ff21c5935..3a7a4ebea09656d8ede3d222d88d0d9e2f1ef86d 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -172,7 +172,6 @@ class installer_base {
$conf['firewall']['installed'] = true;
}
if(is_installed('fail2ban-server')) $conf['fail2ban']['installed'] = true;
- if(is_installed('vzctl')) $conf['openvz']['installed'] = true;
if(is_installed('metronome') && is_installed('metronomectl')) $conf['metronome']['installed'] = true;
if(is_installed('prosody') && is_installed('prosodyctl')) $conf['prosody']['installed'] = true;
if(is_installed('spamassassin')) $conf['spamassassin']['installed'] = true;
@@ -350,7 +349,6 @@ class installer_base {
$dns_server_enabled = ($conf['services']['dns'])?1:0;
$file_server_enabled = ($conf['services']['file'])?1:0;
$db_server_enabled = ($conf['services']['db'])?1:0;
- $vserver_server_enabled = ($conf['openvz']['installed'])?1:0;
$proxy_server_enabled = (isset($conf['services']['proxy']) && $conf['services']['proxy'])?1:0;
$firewall_server_enabled = (isset($conf['services']['firewall']) && $conf['services']['firewall'])?1:0;
@@ -372,14 +370,14 @@ class installer_base {
if($conf['mysql']['master_slave_setup'] == 'y') {
//* Insert the server record in master DB
- $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (1, 1, 'riud', 'riud', 'r', ?, ?, ?, ?, ?, ?, ?, ?, 0, 1, ?, ?, ?);";
- $this->dbmaster->query($sql, $conf['hostname'], $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $server_ini_content, $current_db_version, $proxy_server_enabled, $firewall_server_enabled);
+ $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (1, 1, 'riud', 'riud', 'r', ?, ?, ?, ?, ?, ?, ?, ?, 0, 1, ?, ?, ?);";
+ $this->dbmaster->query($sql, $conf['hostname'], $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $server_ini_content, $current_db_version, $proxy_server_enabled, $firewall_server_enabled);
$conf['server_id'] = $this->dbmaster->insertID();
$conf['server_id'] = $conf['server_id'];
//* Insert the same record in the local DB
- $sql = "INSERT INTO `server` (`server_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (?,1, 1, 'riud', 'riud', 'r', ?, ?, ?, ?, ?, ?, ?, ?, 0, 1, ?, ?, ?);";
- $this->db->query($sql, $conf['server_id'], $conf['hostname'], $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $server_ini_content, $current_db_version, $proxy_server_enabled, $firewall_server_enabled);
+ $sql = "INSERT INTO `server` (`server_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server``, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (?,1, 1, 'riud', 'riud', 'r', ?, ?, ?, ?, ?, ?, ?, ?, 0, 1, ?, ?, ?);";
+ $this->db->query($sql, $conf['server_id'], $conf['hostname'], $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $server_ini_content, $current_db_version, $proxy_server_enabled, $firewall_server_enabled);
//* username for the ispconfig user
$conf['mysql']['master_ispconfig_user'] = 'ispcsrv'.$conf['server_id'];
@@ -388,8 +386,8 @@ class installer_base {
} else {
//* Insert the server, if its not a mster / slave setup
- $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (1, 1, 'riud', 'riud', 'r', ?, ?, ?, ?, ?, ?, ?, ?, 0, 1, ?, ?, ?);";
- $this->db->query($sql, $conf['hostname'], $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $server_ini_content, $current_db_version, $proxy_server_enabled, $firewall_server_enabled);
+ $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (1, 1, 'riud', 'riud', 'r', ?, ?, ?, ?, ?, ?, ?, ?, 0, 1, ?, ?, ?);";
+ $this->db->query($sql, $conf['hostname'], $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $server_ini_content, $current_db_version, $proxy_server_enabled, $firewall_server_enabled);
$conf['server_id'] = $this->db->insertID();
$conf['server_id'] = $conf['server_id'];
}
@@ -2087,11 +2085,10 @@ class installer_base {
$dns_server_enabled = ($conf['services']['dns'])?1:0;
$file_server_enabled = ($conf['services']['file'])?1:0;
$db_server_enabled = ($conf['services']['db'])?1:0;
- $vserver_server_enabled = ($conf['openvz']['installed'])?1:0;
$proxy_server_enabled = ($conf['services']['proxy'])?1:0;
$firewall_server_enabled = ($conf['services']['firewall'])?1:0;
- $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled', proxy_server = '$proxy_server_enabled', firewall_server = '$firewall_server_enabled WHERE server_id = ?";
+ $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', proxy_server = '$proxy_server_enabled', firewall_server = '$firewall_server_enabled WHERE server_id = ?";
$this->db->query($sql, $conf['server_id']);
if($conf['mysql']['master_slave_setup'] == 'y') {
diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php
index 2342291ab0830d300f43f7fd61f38970901795c2..74b3b206374c7d25ea6ace32460ef3bf4b67f997 100644
--- a/install/lib/update.lib.php
+++ b/install/lib/update.lib.php
@@ -154,7 +154,6 @@ function updateDbAndIni() {
$conf['services']['dns'] = ($tmp['dns_server'] == 1)?true:false;
$conf['services']['file'] = ($tmp['file_server'] == 1)?true:false;
$conf['services']['db'] = ($tmp['db_server'] == 1)?true:false;
- $conf['services']['vserver'] = ($tmp['vserver_server'] == 1)?true:false;
$conf['services']['proxy'] = (isset($tmp['proxy_server']) && $tmp['proxy_server'] == 1)?true:false;
$conf['services']['firewall'] = (isset($tmp['firewall_server']) && $tmp['firewall_server'] == 1)?true:false;
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index c9702b00a7686316a7e80dbdc821abaaf37258d8..bed58a44f4a8a3f88cb804f52a17ece3d12d3cc7 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -226,8 +226,6 @@ CREATE TABLE `client` (
`limit_traffic_quota` int(11) NOT NULL DEFAULT '-1',
`limit_client` int(11) NOT NULL DEFAULT '0',
`limit_domainmodule` int(11) NOT NULL DEFAULT '0',
- `limit_openvz_vm` int(11) NOT NULL DEFAULT '0',
- `limit_openvz_vm_template_id` int(11) NOT NULL DEFAULT '0',
`parent_client_id` int(11) unsigned NOT NULL DEFAULT '0',
`username` varchar(64) DEFAULT NULL,
`password` varchar(64) DEFAULT NULL,
@@ -341,8 +339,6 @@ CREATE TABLE `client_template` (
`limit_traffic_quota` int(11) NOT NULL default '-1',
`limit_client` int(11) NOT NULL default '0',
`limit_domainmodule` int(11) NOT NULL DEFAULT '0',
- `limit_openvz_vm` int(11) NOT NULL DEFAULT '0',
- `limit_openvz_vm_template_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`template_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -1063,188 +1059,6 @@ CREATE TABLE `monitor_data` (
-- --------------------------------------------------------
---
--- Table structure for table `openvz_ip`
---
-
-CREATE TABLE IF NOT EXISTS `openvz_ip` (
- `ip_address_id` bigint(20) NOT NULL AUTO_INCREMENT,
- `sys_userid` int(11) NOT NULL DEFAULT '0',
- `sys_groupid` int(11) NOT NULL DEFAULT '0',
- `sys_perm_user` varchar(5) DEFAULT NULL,
- `sys_perm_group` varchar(5) DEFAULT NULL,
- `sys_perm_other` varchar(5) DEFAULT NULL,
- `server_id` int(11) NOT NULL DEFAULT '0',
- `ip_address` varchar(39) DEFAULT NULL,
- `vm_id` int(11) NOT NULL DEFAULT '0',
- `reserved` varchar(255) NOT NULL DEFAULT 'n',
- `additional` varchar(255) NOT NULL DEFAULT 'n',
- PRIMARY KEY (`ip_address_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
-
---
--- Dumping data for table `openvz_ip`
---
-
--- --------------------------------------------------------
-
---
--- Table structure for table `openvz_ostemplate`
---
-
-CREATE TABLE IF NOT EXISTS `openvz_ostemplate` (
- `ostemplate_id` bigint(20) NOT NULL AUTO_INCREMENT,
- `sys_userid` int(11) NOT NULL DEFAULT '0',
- `sys_groupid` int(11) NOT NULL DEFAULT '0',
- `sys_perm_user` varchar(5) DEFAULT NULL,
- `sys_perm_group` varchar(5) DEFAULT NULL,
- `sys_perm_other` varchar(5) DEFAULT NULL,
- `template_name` varchar(255) DEFAULT NULL,
- `template_file` varchar(255) NOT NULL DEFAULT '',
- `server_id` int(11) NOT NULL DEFAULT '0',
- `allservers` varchar(255) NOT NULL DEFAULT 'y',
- `active` varchar(255) NOT NULL DEFAULT 'y',
- `description` text,
- PRIMARY KEY (`ostemplate_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
-
---
--- Dumping data for table `openvz_ostemplate`
---
-
-INSERT INTO `openvz_ostemplate` (`ostemplate_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `template_name`, `template_file`, `server_id`, `allservers`, `active`, `description`) VALUES(1, 1, 1, 'riud', 'riud', '', 'Debian minimal', 'debian-minimal-x86', 1, 'y', 'y', 'Debian minimal image.');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `openvz_template`
---
-
-CREATE TABLE IF NOT EXISTS `openvz_template` (
- `template_id` bigint(20) NOT NULL AUTO_INCREMENT,
- `sys_userid` int(11) NOT NULL DEFAULT '0',
- `sys_groupid` int(11) NOT NULL DEFAULT '0',
- `sys_perm_user` varchar(5) DEFAULT NULL,
- `sys_perm_group` varchar(5) DEFAULT NULL,
- `sys_perm_other` varchar(5) DEFAULT NULL,
- `template_name` varchar(255) DEFAULT NULL,
- `diskspace` int(11) NOT NULL DEFAULT '0',
- `traffic` int(11) NOT NULL DEFAULT '-1',
- `bandwidth` int(11) NOT NULL DEFAULT '-1',
- `ram` int(11) NOT NULL DEFAULT '0',
- `ram_burst` int(11) NOT NULL DEFAULT '0',
- `cpu_units` int(11) NOT NULL DEFAULT '1000',
- `cpu_num` int(11) NOT NULL DEFAULT '4',
- `cpu_limit` int(11) NOT NULL DEFAULT '400',
- `io_priority` int(11) NOT NULL DEFAULT '4',
- `active` varchar(255) NOT NULL DEFAULT 'y',
- `description` text,
- `numproc` varchar(255) DEFAULT NULL,
- `numtcpsock` varchar(255) DEFAULT NULL,
- `numothersock` varchar(255) DEFAULT NULL,
- `vmguarpages` varchar(255) DEFAULT NULL,
- `kmemsize` varchar(255) DEFAULT NULL,
- `tcpsndbuf` varchar(255) DEFAULT NULL,
- `tcprcvbuf` varchar(255) DEFAULT NULL,
- `othersockbuf` varchar(255) DEFAULT NULL,
- `dgramrcvbuf` varchar(255) DEFAULT NULL,
- `oomguarpages` varchar(255) DEFAULT NULL,
- `privvmpages` varchar(255) DEFAULT NULL,
- `lockedpages` varchar(255) DEFAULT NULL,
- `shmpages` varchar(255) DEFAULT NULL,
- `physpages` varchar(255) DEFAULT NULL,
- `numfile` varchar(255) DEFAULT NULL,
- `avnumproc` varchar(255) DEFAULT NULL,
- `numflock` varchar(255) DEFAULT NULL,
- `numpty` varchar(255) DEFAULT NULL,
- `numsiginfo` varchar(255) DEFAULT NULL,
- `dcachesize` varchar(255) DEFAULT NULL,
- `numiptent` varchar(255) DEFAULT NULL,
- `swappages` varchar(255) DEFAULT NULL,
- `hostname` varchar(255) DEFAULT NULL,
- `nameserver` varchar(255) DEFAULT NULL,
- `create_dns` varchar(1) NOT NULL DEFAULT 'n',
- `capability` varchar(255) DEFAULT NULL,
- `features` varchar(255) DEFAULT NULL,
- `iptables` varchar(255) DEFAULT NULL,
- `custom` text,
- PRIMARY KEY (`template_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
-
---
--- Dumping data for table `openvz_template`
---
-
-INSERT INTO `openvz_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `template_name`, `diskspace`, `traffic`, `bandwidth`, `ram`, `ram_burst`, `cpu_units`, `cpu_num`, `cpu_limit`, `io_priority`, `active`, `description`, `numproc`, `numtcpsock`, `numothersock`, `vmguarpages`, `kmemsize`, `tcpsndbuf`, `tcprcvbuf`, `othersockbuf`, `dgramrcvbuf`, `oomguarpages`, `privvmpages`, `lockedpages`, `shmpages`, `physpages`, `numfile`, `avnumproc`, `numflock`, `numpty`, `numsiginfo`, `dcachesize`, `numiptent`, `swappages`, `hostname`, `nameserver`, `create_dns`, `capability`, `features`, `iptables`, `custom`) VALUES(1, 1, 1, 'riud', 'riud', '', 'small', 10, -1, -1, 256, 512, 1000, 4, 400, 4, 'y', '', '999999:999999', '7999992:7999992', '7999992:7999992', '65536:unlimited', '2147483646:2147483646', '214748160:396774400', '214748160:396774400', '214748160:396774400', '214748160:396774400', '65536:65536', '131072:139264', '999999:999999', '65536:65536', '0:2147483647', '23999976:23999976', '180:180', '999999:999999', '500000:500000', '999999:999999', '2147483646:2147483646', '999999:999999', '256000:256000', 'v{VEID}.test.tld', '8.8.8.8 8.8.4.4', 'n', '', '', '', '');
-
--- --------------------------------------------------------
-
---
--- Table structure for table `openvz_traffic`
---
-
-CREATE TABLE IF NOT EXISTS `openvz_traffic` (
- `veid` int(11) NOT NULL DEFAULT '0',
- `traffic_date` date NULL DEFAULT NULL,
- `traffic_bytes` bigint(32) unsigned NOT NULL DEFAULT '0',
- UNIQUE KEY (`veid`,`traffic_date`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
---
--- Dumping data for table `openvz_traffic`
---
-
-
--- --------------------------------------------------------
-
---
--- Table structure for table `openvz_vm`
---
-
-CREATE TABLE IF NOT EXISTS `openvz_vm` (
- `vm_id` bigint(20) NOT NULL AUTO_INCREMENT,
- `sys_userid` int(11) NOT NULL DEFAULT '0',
- `sys_groupid` int(11) NOT NULL DEFAULT '0',
- `sys_perm_user` varchar(5) DEFAULT NULL,
- `sys_perm_group` varchar(5) DEFAULT NULL,
- `sys_perm_other` varchar(5) DEFAULT NULL,
- `server_id` int(11) NOT NULL DEFAULT '0',
- `veid` int(10) unsigned NOT NULL DEFAULT '0',
- `ostemplate_id` int(11) NOT NULL DEFAULT '0',
- `template_id` int(11) NOT NULL DEFAULT '0',
- `ip_address` varchar(255) NOT NULL DEFAULT '',
- `hostname` varchar(255) DEFAULT NULL,
- `vm_password` varchar(255) DEFAULT NULL,
- `start_boot` varchar(255) NOT NULL DEFAULT 'y',
- `bootorder` int(11) NOT NULL DEFAULT '1',
- `active` varchar(255) NOT NULL DEFAULT 'y',
- `active_until_date` date NULL DEFAULT NULL,
- `description` text,
- `diskspace` int(11) NOT NULL DEFAULT '0',
- `traffic` int(11) NOT NULL DEFAULT '-1',
- `bandwidth` int(11) NOT NULL DEFAULT '-1',
- `ram` int(11) NOT NULL DEFAULT '0',
- `ram_burst` int(11) NOT NULL DEFAULT '0',
- `cpu_units` int(11) NOT NULL DEFAULT '1000',
- `cpu_num` int(11) NOT NULL DEFAULT '4',
- `cpu_limit` int(11) NOT NULL DEFAULT '400',
- `io_priority` int(11) NOT NULL DEFAULT '4',
- `nameserver` varchar(255) NOT NULL DEFAULT '8.8.8.8 8.8.4.4',
- `create_dns` varchar(1) NOT NULL DEFAULT 'n',
- `capability` text,
- `features` text,
- `iptabless` text,
- `config` mediumtext,
- `custom` text,
- PRIMARY KEY (`vm_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
-
---
--- Dumping data for table `openvz_vm`
---
-
--- --------------------------------------------------------
-
--
-- Table structure for table `remote_session`
--
@@ -1298,7 +1112,6 @@ CREATE TABLE `server` (
`dns_server` tinyint(1) NOT NULL default '0',
`file_server` tinyint(1) NOT NULL default '0',
`db_server` tinyint(1) NOT NULL default '0',
- `vserver_server` tinyint(1) NOT NULL default '0',
`proxy_server` tinyint(1) NOT NULL default '0',
`firewall_server` tinyint(1) NOT NULL default '0',
`config` text,
diff --git a/install/update.php b/install/update.php
index 01a3799dc210447f86e3f0262b046d06fa074a65..a282289312d31037f6401abe26762a6f59d32ced 100644
--- a/install/update.php
+++ b/install/update.php
@@ -324,18 +324,17 @@ if($reconfigure_master_database_rights_answer == 'yes') {
$inst->find_installed_apps();
//** Check for current service config state and compare to our results
-if ($conf['mysql']['master_slave_setup'] == 'y') $current_svc_config = $inst->dbmaster->queryOneRecord("SELECT mail_server,web_server,dns_server,firewall_server,vserver_server,db_server FROM ?? WHERE server_id=?", $conf['mysql']['master_database'] . '.server', $conf['server_id']);
-else $current_svc_config = $inst->db->queryOneRecord("SELECT mail_server,web_server,dns_server,firewall_server,vserver_server,db_server FROM ?? WHERE server_id=?", $conf["mysql"]["database"] . '.server', $conf['server_id']);
+if ($conf['mysql']['master_slave_setup'] == 'y') $current_svc_config = $inst->dbmaster->queryOneRecord("SELECT mail_server,web_server,dns_server,firewall_server,db_server FROM ?? WHERE server_id=?", $conf['mysql']['master_database'] . '.server', $conf['server_id']);
+else $current_svc_config = $inst->db->queryOneRecord("SELECT mail_server,web_server,dns_server,firewall_server,db_server FROM ?? WHERE server_id=?", $conf["mysql"]["database"] . '.server', $conf['server_id']);
$conf['services']['mail'] = check_service_config_state('mail_server', $conf['postfix']['installed']);
$conf['services']['dns'] = check_service_config_state('dns_server', ($conf['powerdns']['installed'] || $conf['bind']['installed'] || $conf['mydns']['installed']));
$conf['services']['web'] = check_service_config_state('web_server', ($conf['apache']['installed'] || $conf['nginx']['installed']));
$conf['services']['firewall'] = check_service_config_state('firewall_server', ($conf['ufw']['installed'] || $conf['firewall']['installed']));
-$conf['services']['vserver'] = check_service_config_state('vserver_server', $conf['services']['vserver']);
$conf['services']['db'] = check_service_config_state('db_server', true); /* Will always offer as MySQL is of course installed on this host as it's a requirement for ISPC to work... */
unset($current_svc_config);
//** Write new decisions into DB
-$sql = "UPDATE ?? SET mail_server = '{$conf['services']['mail']}', web_server = '{$conf['services']['web']}', dns_server = '{$conf['services']['dns']}', file_server = '{$conf['services']['file']}', db_server = '{$conf['services']['db']}', vserver_server = '{$conf['services']['vserver']}', proxy_server = '{$conf['services']['proxy']}', firewall_server = '$firewall_server_enabled' WHERE server_id = ?";
+$sql = "UPDATE ?? SET mail_server = '{$conf['services']['mail']}', web_server = '{$conf['services']['web']}', dns_server = '{$conf['services']['dns']}', file_server = '{$conf['services']['file']}', db_server = '{$conf['services']['db']}', proxy_server = '{$conf['services']['proxy']}', firewall_server = '$firewall_server_enabled' WHERE server_id = ?";
$inst->db->query($sql, $conf['mysql']['database'].'.server', $conf['server_id']);
if($conf['mysql']['master_slave_setup'] == 'y') {
$inst->dbmaster->query($sql, $conf['mysql']['master_database'].'.server', $conf['server_id']);
diff --git a/interface/lib/classes/custom_datasource.inc.php b/interface/lib/classes/custom_datasource.inc.php
index f31296882d51a7cf0bcd4de2d8a30476e2e8ab3e..dc3e9e837932041e60022e2828d660782e7a20b0 100644
--- a/interface/lib/classes/custom_datasource.inc.php
+++ b/interface/lib/classes/custom_datasource.inc.php
@@ -136,9 +136,6 @@ class custom_datasource {
case 'default_dbserver':
$field = 'db_server';
break;
- case 'default_vserverserver':
- $field = 'vserver_server';
- break;
case 'mail_servers':
$field = 'mail_server';
break;
diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index a86057a0647c0544849b97e6d6107c3d33663943..bace18f44cf3486cf0e74b0f26115c67c1d44ad2 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -232,12 +232,6 @@ class functions {
}
}
- $results = $app->db->queryAllRecords("SELECT ip_address AS ip FROM openvz_ip");
- if(!empty($results) && is_array($results)){
- foreach($results as $result){
- if(preg_match($regex, $result['ip'])) $ips[] = $result['ip'];
- }
- }
$results = $groupid != 1 ? $app->db->queryAllRecords("SELECT rr.data AS server_ip, rr.name as server_name, soa.origin as domain FROM dns_rr as rr, dns_soa as soa WHERE (rr.type = 'A' OR rr.type = 'AAAA') AND soa.id = rr.zone AND rr.sys_groupid = ?", $groupid) : $results = $app->db->queryAllRecords("SELECT rr.data AS server_ip, rr.name as server_name, soa.origin as domain FROM dns_rr as rr, dns_soa as soa WHERE (rr.type = 'A' OR rr.type = 'AAAA') AND soa.id = rr.zone");
if(!empty($results) && is_array($results)){
diff --git a/interface/lib/classes/remote.d/openvz.inc.php b/interface/lib/classes/remote.d/openvz.inc.php
deleted file mode 100644
index a4ef38ad792003aaaf9e28fe293a1fbc0fd0f974..0000000000000000000000000000000000000000
--- a/interface/lib/classes/remote.d/openvz.inc.php
+++ /dev/null
@@ -1,480 +0,0 @@
-
-
-*/
-
-class remoting_openvz extends remoting {
- //* Functions for virtual machine management
-
- //* Get OpenVZ OStemplate details
- public function openvz_ostemplate_get($session_id, $ostemplate_id)
- {
- global $app;
-
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $app->uses('remoting_lib');
- $app->remoting_lib->loadFormDef('../vm/form/openvz_ostemplate.tform.php');
- return $app->remoting_lib->getDataRecord($ostemplate_id);
- }
-
- //* Add a openvz ostemplate record
- public function openvz_ostemplate_add($session_id, $client_id, $params)
- {
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- return $this->insertQuery('../vm/form/openvz_ostemplate.tform.php', $client_id, $params);
- }
-
- //* Update openvz ostemplate record
- public function openvz_ostemplate_update($session_id, $client_id, $ostemplate_id, $params)
- {
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $affected_rows = $this->updateQuery('../vm/form/openvz_ostemplate.tform.php', $client_id, $ostemplate_id, $params);
- return $affected_rows;
- }
-
- //* Delete openvz ostemplate record
- public function openvz_ostemplate_delete($session_id, $ostemplate_id)
- {
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $affected_rows = $this->deleteQuery('../vm/form/openvz_ostemplate.tform.php', $ostemplate_id);
- return $affected_rows;
- }
-
- //* Get OpenVZ template details
- public function openvz_template_get($session_id, $template_id)
- {
- global $app;
-
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $app->uses('remoting_lib');
- $app->remoting_lib->loadFormDef('../vm/form/openvz_template.tform.php');
- return $app->remoting_lib->getDataRecord($template_id);
- }
-
- //* Add a openvz template record
- public function openvz_template_add($session_id, $client_id, $params)
- {
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- return $this->insertQuery('../vm/form/openvz_template.tform.php', $client_id, $params);
- }
-
- //* Update openvz template record
- public function openvz_template_update($session_id, $client_id, $template_id, $params)
- {
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $affected_rows = $this->updateQuery('../vm/form/openvz_template.tform.php', $client_id, $template_id, $params);
- return $affected_rows;
- }
-
- //* Delete openvz template record
- public function openvz_template_delete($session_id, $template_id)
- {
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $affected_rows = $this->deleteQuery('../vm/form/openvz_template.tform.php', $template_id);
- return $affected_rows;
- }
-
- //* Get OpenVZ ip details
- public function openvz_ip_get($session_id, $ip_id)
- {
- global $app;
-
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $app->uses('remoting_lib');
- $app->remoting_lib->loadFormDef('../vm/form/openvz_ip.tform.php');
- return $app->remoting_lib->getDataRecord($ip_id);
- }
-
- //* Get OpenVZ a free IP address
- public function openvz_get_free_ip($session_id, $server_id = 0)
- {
- global $app;
-
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $server_id = $app->functions->intval($server_id);
-
- if($server_id > 0) {
- $tmp = $app->db->queryOneRecord("SELECT ip_address_id, server_id, ip_address FROM openvz_ip WHERE reserved = 'n' AND vm_id = 0 AND server_id = ? LIMIT 0,1", $server_id);
- } else {
- $tmp = $app->db->queryOneRecord("SELECT ip_address_id, server_id, ip_address FROM openvz_ip WHERE reserved = 'n' AND vm_id = 0 LIMIT 0,1");
- }
-
- if(count($tmp) > 0) {
- return $tmp;
- } else {
- throw new SoapFault('no_free_ip', 'There is no free IP available.');
- }
- }
-
- //* Add a openvz ip record
- public function openvz_ip_add($session_id, $client_id, $params)
- {
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- return $this->insertQuery('../vm/form/openvz_ip.tform.php', $client_id, $params);
- }
-
- //* Update openvz ip record
- public function openvz_ip_update($session_id, $client_id, $ip_id, $params)
- {
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $affected_rows = $this->updateQuery('../vm/form/openvz_ip.tform.php', $client_id, $ip_id, $params);
- return $affected_rows;
- }
-
- //* Delete openvz ip record
- public function openvz_ip_delete($session_id, $ip_id)
- {
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $affected_rows = $this->deleteQuery('../vm/form/openvz_ip.tform.php', $ip_id);
- return $affected_rows;
- }
-
- //* Get OpenVZ vm details
- public function openvz_vm_get($session_id, $vm_id)
- {
- global $app;
-
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $app->uses('remoting_lib');
- $app->remoting_lib->loadFormDef('../vm/form/openvz_vm.tform.php');
- return $app->remoting_lib->getDataRecord($vm_id);
- }
-
- //* Get OpenVZ list
- public function openvz_vm_get_by_client($session_id, $client_id)
- {
- global $app;
-
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
-
- if (!empty($client_id)) {
- $client_id = $app->functions->intval($client_id);
- $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client_id);
- $sql = "SELECT * FROM openvz_vm WHERE sys_groupid = ?";
- $result = $app->db->queryAllRecords($sql, $tmp['groupid']);
- return $result;
- }
- return false;
- }
-
- //* Add a openvz vm record
- public function openvz_vm_add($session_id, $client_id, $params)
- {
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- return $this->insertQuery('../vm/form/openvz_vm.tform.php', $client_id, $params);
- }
-
- //* Add a openvz vm record from template
- public function openvz_vm_add_from_template($session_id, $client_id, $ostemplate_id, $template_id, $override_params = array())
- {
- global $app;
-
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
-
-
- $template_id = $app->functions->intval($template_id);
- $ostemplate_id = $app->functions->intval($ostemplate_id);
-
- //* Verify parameters
- if($template_id == 0) {
- throw new SoapFault('template_id_error', 'Template ID must be > 0.');
- return false;
- }
- if($ostemplate_id == 0) {
- throw new SoapFault('ostemplate_id_error', 'OSTemplate ID must be > 0.');
- return false;
- }
-
- // Verify if template and ostemplate exist
- $tmp = $app->db->queryOneRecord("SELECT template_id FROM openvz_template WHERE template_id = ?", $template_id);
- if(!is_array($tmp)) {
- throw new SoapFault('template_id_error', 'Template does not exist.');
- return false;
- }
- $tmp = $app->db->queryOneRecord("SELECT ostemplate_id FROM openvz_ostemplate WHERE ostemplate_id = ?", $ostemplate_id);
- if(!is_array($tmp)) {
- throw new SoapFault('ostemplate_id_error', 'OSTemplate does not exist.');
- return false;
- }
-
- //* Get the template
- $vtpl = $app->db->queryOneRecord("SELECT * FROM openvz_template WHERE template_id = ?", $template_id);
-
- //* Get the IP address and server_id
- if($override_params['server_id'] > 0) {
- $vmip = $app->db->queryOneRecord("SELECT ip_address_id, server_id, ip_address FROM openvz_ip WHERE reserved = 'n' AND vm_id = 0 AND server_id = ? LIMIT 0,1", $override_params['server_id']);
- } else {
- $vmip = $app->db->queryOneRecord("SELECT ip_address_id, server_id, ip_address FROM openvz_ip WHERE reserved = 'n' AND vm_id = 0 LIMIT 0,1");
- }
- if(!is_array($vmip)) {
- throw new SoapFault('vm_ip_error', 'Unable to get a free VM IP.');
- return false;
- }
-
- //* Build the $params array
- $params = array();
- $params['server_id'] = $vmip['server_id'];
- $params['ostemplate_id'] = $ostemplate_id;
- $params['template_id'] = $template_id;
- $params['ip_address'] = $vmip['ip_address'];
- $params['hostname'] = (isset($override_params['hostname']))?$override_params['hostname']:$vtpl['hostname'];
- $params['vm_password'] = (isset($override_params['vm_password']))?$override_params['vm_password']:$app->auth->get_random_password(10);
- $params['start_boot'] = (isset($override_params['start_boot']))?$override_params['start_boot']:'y';
- $params['active'] = (isset($override_params['active']))?$override_params['active']:'y';
- $params['active_until_date'] = (isset($override_params['active_until_date']))?$override_params['active_until_date']:null;
- $params['description'] = (isset($override_params['description']))?$override_params['description']:'';
-
- //* The next params get filled with pseudo values, as the get replaced
- //* by the openvz event plugin anyway with values from the template
- $params['veid'] = 1;
- $params['diskspace'] = 1;
- $params['ram'] = 1;
- $params['ram_burst'] = 1;
- $params['cpu_units'] = 1;
- $params['cpu_num'] = 1;
- $params['cpu_limit'] = 1;
- $params['io_priority'] = 1;
- $params['nameserver'] = '8.8.8.8 8.8.4.4';
- $params['create_dns'] = 'n';
- $params['capability'] = '';
-
- return $this->insertQuery('../vm/form/openvz_vm.tform.php', $client_id, $params, 'vm:openvz_vm:on_after_insert');
- }
-
- //* Update openvz vm record
- public function openvz_vm_update($session_id, $client_id, $vm_id, $params)
- {
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $affected_rows = $this->updateQuery('../vm/form/openvz_vm.tform.php', $client_id, $vm_id, $params, 'vm:openvz_vm:on_after_update');
- return $affected_rows;
- }
-
- //* Delete openvz vm record
- public function openvz_vm_delete($session_id, $vm_id)
- {
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
- $affected_rows = $this->deleteQuery('../vm/form/openvz_vm.tform.php', $vm_id, 'vm:openvz_vm:on_after_delete');
- return $affected_rows;
- }
-
- //* Start VM
- public function openvz_vm_start($session_id, $vm_id)
- {
- global $app;
-
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
-
- $app->uses('remoting_lib');
- $app->remoting_lib->loadFormDef('../vm/form/openvz_vm.tform.php');
- $vm = $app->remoting_lib->getDataRecord($vm_id);
-
- if(!is_array($vm)) {
- throw new SoapFault('action_pending', 'No VM with this ID available.');
- return false;
- }
-
- if($vm['active'] == 'n') {
- throw new SoapFault('action_pending', 'VM is not in active state.');
- return false;
- }
-
- $action = 'openvz_start_vm';
-
- $tmp = $app->db->queryOneRecord("SELECT count(action_id) as actions FROM sys_remoteaction
- WHERE server_id = ?
- AND action_type = ?
- AND action_param = ?
- AND action_state = 'pending'", $vm['server_id'], $action, $vm['veid']);
-
- if($tmp['actions'] > 0) {
- throw new SoapFault('action_pending', 'There is already a action pending for this VM.');
- return false;
- } else {
- $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " .
- "VALUES (?, ?, ?, ?, 'pending', '')";
- $app->db->query($sql, (int)$vm['server_id'], time(), $action, $vm['veid']);
- }
- }
-
- //* Stop VM
- public function openvz_vm_stop($session_id, $vm_id)
- {
- global $app;
-
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
-
- $app->uses('remoting_lib');
- $app->remoting_lib->loadFormDef('../vm/form/openvz_vm.tform.php');
- $vm = $app->remoting_lib->getDataRecord($vm_id);
-
- if(!is_array($vm)) {
- throw new SoapFault('action_pending', 'No VM with this ID available.');
- return false;
- }
-
- if($vm['active'] == 'n') {
- throw new SoapFault('action_pending', 'VM is not in active state.');
- return false;
- }
-
- $action = 'openvz_stop_vm';
-
- $tmp = $app->db->queryOneRecord("SELECT count(action_id) as actions FROM sys_remoteaction
- WHERE server_id = ?
- AND action_type = ?
- AND action_param = ?
- AND action_state = 'pending'", $vm['server_id'], $action, $vm['veid']);
-
- if($tmp['actions'] > 0) {
- throw new SoapFault('action_pending', 'There is already a action pending for this VM.');
- return false;
- } else {
- $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " .
- "VALUES (?, ?, ?, ?, 'pending', '')";
- $app->db->query($sql, (int)$vm['server_id'], time(), $action, $vm['veid']);
- }
- }
-
- //* Restart VM
- public function openvz_vm_restart($session_id, $vm_id)
- {
- global $app;
-
- if(!$this->checkPerm($session_id, 'vm_openvz')) {
- throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
- return false;
- }
-
- $app->uses('remoting_lib');
- $app->remoting_lib->loadFormDef('../vm/form/openvz_vm.tform.php');
- $vm = $app->remoting_lib->getDataRecord($vm_id);
-
- if(!is_array($vm)) {
- throw new SoapFault('action_pending', 'No VM with this ID available.');
- return false;
- }
-
- if($vm['active'] == 'n') {
- throw new SoapFault('action_pending', 'VM is not in active state.');
- return false;
- }
-
- $action = 'openvz_restart_vm';
-
- $tmp = $app->db->queryOneRecord("SELECT count(action_id) as actions FROM sys_remoteaction
- WHERE server_id = ?
- AND action_type = ?
- AND action_param = ?
- AND action_state = 'pending'", $vm['server_id'], $action, $vm['veid']);
-
- if($tmp['actions'] > 0) {
- throw new SoapFault('action_pending', 'There is already a action pending for this VM.');
- return false;
- } else {
- $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " .
- "VALUES (?, ?, ?, ?, 'pending', '')";
- $app->db->query($sql, (int)$vm['server_id'], time(), $action, $vm['veid']);
- }
- }
-
-}
-
-?>
diff --git a/interface/lib/classes/remote.d/server.inc.php b/interface/lib/classes/remote.d/server.inc.php
index 4f612c69c175e4e93fba8c8f5f801203334db5db..f1bf610afb905ac2938ae53110169599eb41b8f9 100644
--- a/interface/lib/classes/remote.d/server.inc.php
+++ b/interface/lib/classes/remote.d/server.inc.php
@@ -228,7 +228,7 @@ class remoting_server extends remoting {
return false;
}
if (!empty($session_id) && !empty($server_id)) {
- $sql = "SELECT mail_server, web_server, dns_server, file_server, db_server, vserver_server, proxy_server, firewall_server, mirror_server_id FROM server WHERE server_id = ?";
+ $sql = "SELECT mail_server, web_server, dns_server, file_server, db_server, proxy_server, firewall_server, mirror_server_id FROM server WHERE server_id = ?";
$all = $app->db->queryOneRecord($sql, $server_id);
return $all;
} else {
diff --git a/interface/lib/classes/validate_openvz.inc.php b/interface/lib/classes/validate_openvz.inc.php
deleted file mode 100644
index 4aa1a709c7f28d9267cb734b9bd0ca51f3c968bf..0000000000000000000000000000000000000000
--- a/interface/lib/classes/validate_openvz.inc.php
+++ /dev/null
@@ -1,66 +0,0 @@
-tform->wordbook[$errmsg])) {
- return $app->tform->wordbook[$errmsg].$additional."
\r\n";
- } else {
- return $errmsg."
".$additional."
\r\n";
- }
- }
-
- function check_custom($field_name, $field_value, $validator) {
- $template = file('../vm/templates/openvz.conf.tpl', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
- $custom_array = explode("\n", $field_value);
- $used_parameters = array();
- foreach ($template as $line) {
- $line = trim ($line);
- if (preg_match('/^[^#].*=\".*\"/', $line)) {
- $line = explode('=', $line, 2);
- $used_parameters[] = $line[0];
- }
- }
- foreach ($custom_array as $check) {
- $check = trim(strtoupper($check));
- $check = explode('=', trim($check), 2);
- $check = trim($check[0]);
- if (in_array($check, $used_parameters)) {
- return $this->get_error($validator['errmsg'], $check);
- }
- }
- }
-
-}
diff --git a/interface/lib/plugins/vm_openvz_plugin.inc.php b/interface/lib/plugins/vm_openvz_plugin.inc.php
deleted file mode 100644
index 281fae4a1f62f69d48a0fc91cae3fdba05db2f7a..0000000000000000000000000000000000000000
--- a/interface/lib/plugins/vm_openvz_plugin.inc.php
+++ /dev/null
@@ -1,298 +0,0 @@
-plugin->registerEvent('vm:openvz_vm:on_after_insert', 'vm_openvz_plugin', 'openvz_vm_insert');
- $app->plugin->registerEvent('vm:openvz_vm:on_after_update', 'vm_openvz_plugin', 'openvz_vm_update');
- $app->plugin->registerEvent('vm:openvz_vm:on_after_delete', 'vm_openvz_plugin', 'openvz_vm_delete');
- }
-
- /*
- Function that gets called after a new vm was inserted
- */
- function openvz_vm_insert($event_name, $page_form) {
- global $app, $conf;
-
- $this->id = $app->functions->intval($page_form->id);
- $this->dataRecord = $page_form->dataRecord;
- $this->oldDataRecord = $page_form->oldDataRecord;
-
- // make sure that the record belongs to the clinet group and not the admin group when admin inserts it
- // also make sure that the user can not delete domain created by a admin
- if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) {
- $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]);
- $app->db->query("UPDATE openvz_vm SET sys_groupid = ? WHERE vm_id = ?", $client_group_id, $this->id);
- }
- if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($this->dataRecord["client_group_id"])) {
- $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]);
- $app->db->query("UPDATE openvz_vm SET sys_groupid = ? WHERE vm_id = ?", $client_group_id, $this->id);
- }
-
- // Set the VEID
- $tmp = $app->db->queryOneRecord('SELECT MAX(veid) + 1 as newveid FROM openvz_vm');
- $veid = ($tmp['newveid'] > 100)?$tmp['newveid']:101;
- $app->db->query("UPDATE openvz_vm SET veid = ? WHERE vm_id = ?", $veid, $this->id);
- unset($tmp);
-
- // Apply template values to the advanced tab settings
- $this->applyTemplate();
-
- // Set the IP address
- $app->db->query("UPDATE openvz_ip SET vm_id = ? WHERE ip_address = ?", $this->id, $this->dataRecord['ip_address']);
-
- // Set additional IPs
- if (isset($this->dataRecord['additional_ip'])) {
- $app->db->query("UPDATE openvz_ip SET vm_id = 0, additional = 'n' WHERE vm_id = ? AND additional='y'", $this->id);
- foreach ($this->dataRecord['additional_ip'] as $idx => $rec) {
- $app->db->query("UPDATE openvz_ip SET vm_id = ?, additional = 'y' WHERE ip_address = ?", $this->id, $rec);
- }
- }
-
- // Create the OpenVZ config file and store it in config field
- $this->makeOpenVZConfig();
-
- // Create the DNS record
- $this->createDNS();
-
- }
-
- /*
- Function that gets called after a vm was updated
- */
- function openvz_vm_update($event_name, $page_form) {
- global $app, $conf;
-
- $this->id = $app->functions->intval($page_form->id);
- $this->dataRecord = $page_form->dataRecord;
- $this->oldDataRecord = $page_form->oldDataRecord;
-
- // make sure that the record belongs to the clinet group and not the admin group when a admin inserts it
- // also make sure that the user can not delete domain created by a admin
- if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) {
- $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]);
- $app->db->query("UPDATE openvz_vm SET sys_groupid = ? WHERE vm_id = ?", $client_group_id, $this->id);
- }
- if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($this->dataRecord["client_group_id"])) {
- $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]);
- $app->db->query("UPDATE openvz_vm SET sys_groupid = ? WHERE vm_id = ?", $client_group_id, $this->id);
- }
-
- if(isset($this->dataRecord["ostemplate_id"]) && $this->oldDataRecord["ostemplate_id"] != $this->dataRecord["ostemplate_id"]) {
- $this->applyTemplate();
- }
-
- // Set the IP address
- if(isset($this->dataRecord['ip_address'])) {
- $app->db->query("UPDATE openvz_ip SET vm_id = 0 WHERE vm_id = ? AND additional='n'", $this->id);
- $app->db->query("UPDATE openvz_ip SET vm_id = ?, additional = 'n' WHERE ip_address = ?", $this->id, $this->dataRecord['ip_address']);
- }
-
- // Set additional IPs
- if (isset($this->dataRecord['additional_ip'])) {
- $app->db->query("UPDATE openvz_ip SET vm_id = 0, additional = 'n' WHERE (vm_id = ? AND additional='y')", $this->id);
- foreach ($this->dataRecord['additional_ip'] as $idx => $rec) {
- $app->db->query("UPDATE openvz_ip SET vm_id = ?, additional = 'y' WHERE ip_address = ?", $this->id, $rec);
- }
- }
-
- // Create the OpenVZ config file and store it in config field
- $this->makeOpenVZConfig();
-
- // Create the DNS record
- if((isset($this->dataRecord['hostname']) && $this->dataRecord['hostname'] != $this->oldDataRecord['hostname'])
- or (isset($this->dataRecord['create_dns']) && $this->dataRecord['create_dns'] != $this->oldDataRecord['create_dns'])) {
- $this->createDNS();
- }
-
- }
-
- function openvz_vm_delete($event_name, $page_form) {
- global $app, $conf;
-
- //* Free the IP address
- $tmp_rec = $app->db->queryAllRecords("SELECT ip_address_id FROM openvz_ip WHERE vm_id = ?", $page_form->id);
- foreach ($tmp_rec as $tmp) {
- $app->db->datalogUpdate('openvz_ip', array('vm_id' => 0), 'ip_address_id', $tmp['ip_address_id']);
- }
- }
-
- private function applyTemplate() {
- global $app, $conf;
-
- $tpl = $app->db->queryOneRecord("SELECT * FROM openvz_template WHERE template_id = ?", $this->dataRecord["template_id"]);
-
- $sql = "UPDATE openvz_vm SET ";
- $sql .= "diskspace = ?, ";
- $sql .= "ram = ?, ";
- $sql .= "ram_burst = ?, ";
- $sql .= "cpu_units = ?, ";
- $sql .= "cpu_num = ?, ";
- $sql .= "cpu_limit = ?, ";
- $sql .= "io_priority = ?, ";
- $sql .= "nameserver = ?, ";
- $sql .= "create_dns = ?, ";
- $sql .= "capability = ?, ";
- $sql .= "features = ?, ";
- $sql .= "iptables = ? ";
- $sql .= "custom = ? ";
- $sql .= "WHERE vm_id = ?";
- $app->db->query($sql, $tpl['diskspace'], $tpl['ram'], $tpl['ram_burst'], $tpl['cpu_units'], $tpl['cpu_num'], $tpl['cpu_limit'], $tpl['io_priority'], $tpl['nameserver'], $tpl['create_dns'], $tpl['capability'], $tpl['features'], $tpl['iptables'], $tpl['custom'], $this->id);
-
- }
-
- private function makeOpenVZConfig() {
- global $app, $conf;
-
- $vm = $app->db->queryOneRecord("SELECT * FROM openvz_vm WHERE vm_id = ?",$app->functions->intval($this->id));
- $vm_template = $app->db->queryOneRecord("SELECT * FROM openvz_template WHERE template_id = ?",$app->functions->intval($vm['template_id']));
- $burst_ram = $vm['ram_burst']*256;
- $guar_ram = $vm['ram']*256;
-
- $app->load('tpl');
- $tpl = new tpl();
- $tpl->newTemplate('../vm/templates/openvz.conf.tpl');
-
- $onboot = ($vm['start_boot'] == 'y')?'yes':'no';
- $tpl->setVar('onboot', $onboot);
-
- $tpl->setVar('bootorder', $vm['bootorder']);
- $tpl->setVar('kmemsize', $vm_template['kmemsize']);
- $tpl->setVar('lockedpages', $vm_template['lockedpages']);
- $tpl->setVar('privvmpages', $burst_ram.':'.$burst_ram*1.0625);
- $tpl->setVar('shmpages', $guar_ram.':'.$guar_ram);
- $tpl->setVar('numproc', $vm_template['numproc']);
- $tpl->setVar('physpages', $vm_template['physpages']);
- $tpl->setVar('vmguarpages', $guar_ram.':unlimited');
- $tpl->setVar('oomguarpages', $guar_ram.':'.$guar_ram);
- $tpl->setVar('numtcpsock', $vm_template['numtcpsock']);
- $tpl->setVar('numflock', $vm_template['numflock']);
- $tpl->setVar('numpty', $vm_template['numpty']);
- $tpl->setVar('numsiginfo', $vm_template['numsiginfo']);
- $tpl->setVar('tcpsndbuf', $vm_template['tcpsndbuf']);
- $tpl->setVar('tcprcvbuf', $vm_template['tcprcvbuf']);
- $tpl->setVar('othersockbuf', $vm_template['othersockbuf']);
- $tpl->setVar('dgramrcvbuf', $vm_template['dgramrcvbuf']);
- $tpl->setVar('numothersock', $vm_template['numothersock']);
- $tpl->setVar('dcachesize', $vm_template['dcachesize']);
- $tpl->setVar('numfile', $vm_template['numfile']);
- $tpl->setVar('avnumproc', $vm_template['avnumproc']);
- $tpl->setVar('numiptent', $vm_template['numiptent']);
- $tpl->setVar('swappages', $vm_template['swappages']);
-
- $diskspace = $vm['diskspace']*1048576;
- $diskinodes = $vm['diskspace']*524288;
-
- $tpl->setVar('diskspace', $diskspace.":".$diskspace);
- $tpl->setVar('diskinodes', $diskinodes.":".$diskinodes);
- $tpl->setVar('io_priority', $vm['io_priority']);
-
- $tpl->setVar('cpu_num', $vm['cpu_num']);
- $tpl->setVar('cpu_units', $vm['cpu_units']);
- $tpl->setVar('cpu_limit', $vm['cpu_limit']);
-
- $hostname = str_replace('{VEID}', $vm['veid'], $vm['hostname']);
-
- $tpl->setVar('hostname', $hostname);
-
- $additional_ips = $app->db->queryAllRecords("SELECT * FROM openvz_ip WHERE vm_id = ?",$this->id);
- if (isset($additional_ips)) {
- $vm['ip_address']='';
- foreach ($additional_ips as $ip) {
- $vm['ip_address'] .= " ".$ip['ip_address'];
- }
- $vm['ip_address'] = substr($vm['ip_address'],1);
- }
- $tpl->setVar('ip_address', $vm['ip_address']);
-
- $tpl->setVar('ip_address', $vm['ip_address']);
- $tpl->setVar('nameserver', $vm['nameserver']);
- $tpl->setVar('capability', $vm['capability']);
- $tpl->setVar('features', $vm['features']);
- $tpl->setVar('iptables', $vm['iptables']);
-
- $tpl->setVar('custom', $vm['custom']);
-
- $tmp = $app->db->queryOneRecord("SELECT template_file FROM openvz_ostemplate WHERE ostemplate_id = ?", $app->functions->intval($vm['ostemplate_id']));
- $tpl->setVar('ostemplate', $tmp['template_file']);
- unset($tmp);
-
- $openvz_config = $tpl->grab();
- $app->db->query("UPDATE openvz_vm SET config = ? WHERE vm_id = ?", $openvz_config, $app->functions->intval($this->id));
-
- unset($tpl);
-
- }
-
- private function createDNS() {
- global $app, $conf;
-
- $vm = $app->db->queryOneRecord("SELECT * FROM openvz_vm WHERE vm_id = ?", $app->functions->intval($this->id));
-
- if($vm['create_dns'] != 'y') return;
-
- $full_hostname = str_replace('{VEID}', $vm['veid'], $vm['hostname']);
- $hostname_parts = explode('.', $full_hostname);
- $hostname = $hostname_parts[0];
- unset($hostname_parts[0]);
- $zone = implode('.', $hostname_parts);
- unset($hostname_parts);
-
- // Find the dns zone
- $zone_rec = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE origin = ?", $zone);
- $rr_rec = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ? AND name = ?", $zone_rec['id'], $hostname);
-
- if($zone_rec['id'] > 0) {
- $ip_address = $vm['ip_address'];
- $sys_userid = $app->functions->intval($zone_rec['sys_userid']);
- $sys_groupid = $app->functions->intval($zone_rec['sys_groupid']);
- $server_id = $app->functions->intval($zone_rec['server_id']);
- $dns_soa_id = $app->functions->intval($zone_rec['id']);
-
- if($rr_rec['id'] > 0) {
- $app->uses('validate_dns');
- $app->db->datalogUpdate('dns_rr', array("data" => $ip_address), 'id', $app->functions->intval($rr_rec['id']));
- $serial = $app->validate_dns->increase_serial($zone_rec['serial']);
- $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $app->functions->intval($zone_rec['id']));
- } else {
- $insert_data = array(
- "sys_userid" => $sys_userid,
- "sys_groupid" => $sys_groupid,
- "sys_perm_user" => 'riud',
- "sys_perm_group" => 'riud',
- "sys_perm_other" => '',
- "server_id" => $server_id,
- "zone" => $dns_soa_id,
- "name" => $hostname,
- "type" => @(preg_match("/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/", $ip_address))?'A':'AAAA',
- "data" => $ip_address,
- "aux" => '0',
- "ttl" => '3600',
- "active" => 'Y'
- );
- $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id');
- }
-
- }
- }
-
-}
diff --git a/interface/lib/server_conf.master b/interface/lib/server_conf.master
index 8fd54d9926967b1b3ec5b9759808e7262079439d..7e705935e6829e3327dd3d784a3779ffa1468f0f 100644
--- a/interface/lib/server_conf.master
+++ b/interface/lib/server_conf.master
@@ -21,6 +21,3 @@ module=generic
[file]
module=generic
-
-[vserver]
-module=generic
\ No newline at end of file
diff --git a/interface/web/admin/form/server.tform.php b/interface/web/admin/form/server.tform.php
index 2c74e6785b4351e60df8d1dfa74a5e8a62c5ddbb..e28e3e34d85ef085e763c7d864c4be4d7d2797c8 100644
--- a/interface/web/admin/form/server.tform.php
+++ b/interface/web/admin/form/server.tform.php
@@ -102,12 +102,6 @@ $form["tabs"]['services'] = array (
'default' => '0',
'value' => array(0 => 0, 1 => 1)
),
- 'vserver_server' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'CHECKBOX',
- 'default' => '0',
- 'value' => array(0 => 0, 1 => 1)
- ),
'mirror_server_id' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
diff --git a/interface/web/admin/list/server.list.php b/interface/web/admin/list/server.list.php
index 5a44a7a2ba854057abcb1cedf2ae48b271849c76..ee8f590021a14e2876605323be3e3b3afb7c72a8 100644
--- a/interface/web/admin/list/server.list.php
+++ b/interface/web/admin/list/server.list.php
@@ -100,14 +100,3 @@ $liste['item'][] = array( 'field' => 'db_server',
'suffix' => '%',
'width' => '',
'value' => array('1' => $app->lng('yes_txt'), '0' => $app->lng('no_txt')));
-
-$liste['item'][] = array( 'field' => 'vserver_server',
- 'datatype' => 'VARCHAR',
- 'formtype' => 'SELECT',
- 'op' => 'like',
- 'prefix' => '%',
- 'suffix' => '%',
- 'width' => '',
- 'value' => array('1' => $app->lng('yes_txt'), '0' => $app->lng('no_txt')));
-
-?>
diff --git a/interface/web/admin/templates/server_edit_services.htm b/interface/web/admin/templates/server_edit_services.htm
index 0ee07d020e066b8b7e4eb7bcfefa9422559a9df5..22d4a26f1088d476fa07f400d41c2a1f5eeb94ba 100644
--- a/interface/web/admin/templates/server_edit_services.htm
+++ b/interface/web/admin/templates/server_edit_services.htm
@@ -37,12 +37,6 @@
{tmpl_var name="toolsarea_head_txt"}
- - - - - - -{tmpl_var name='search_limit'} | -||||
---|---|---|---|---|
- | - | - | - | - - | -
{tmpl_var name="server_id"} | -{tmpl_var name="vm_id"} | -{tmpl_var name="ip_address"} | -{tmpl_var name="reserved"} | -- - | -
{tmpl_var name='globalsearch_noresults_text_txt'} | -||||
{tmpl_var name="toolsarea_head_txt"}
- - - - - - -{tmpl_var name='search_limit'} | -|||||
---|---|---|---|---|---|
- | - | - | - | - | - - | -
{tmpl_var name="active"} | -{tmpl_var name="ostemplate_id"} | -{tmpl_var name="template_name"} | -{tmpl_var name="server_id"} | -{tmpl_var name="allservers"} | -- - | -
{tmpl_var name='globalsearch_noresults_text_txt'} | -|||||
{tmpl_var name="toolsarea_head_txt"}
- - - - - - -{tmpl_var name='search_limit'} | -||
---|---|---|
- | - | - - | -
{tmpl_var name="active"} | -{tmpl_var name="template_name"} | -- - | -
{tmpl_var name='globalsearch_noresults_text_txt'} | -||
{tmpl_var name="toolsarea_head_txt"}
- - - - - - -{tmpl_var name='search_limit'} | -|||||||
---|---|---|---|---|---|---|---|
- | - | - | - | - | - | - | - - | -
{tmpl_var name="veid"} | -{tmpl_var name="active"} | -{tmpl_var name="server_id"} | -{tmpl_var name="ostemplate_id"} | -{tmpl_var name="template_id"} | -{tmpl_var name="hostname"} | -{tmpl_var name="ip_address"} | -- - - | -
{tmpl_var name='globalsearch_noresults_text_txt'} | -|||||||