diff --git a/web/edit/server/apache2/index.php b/web/edit/server/apache2/index.php index d3c79bcb..10eddb7c 100644 --- a/web/edit/server/apache2/index.php +++ b/web/edit/server/apache2/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." apache2 ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/bind9/index.php b/web/edit/server/bind9/index.php index 155e8176..bbe7e563 100644 --- a/web/edit/server/bind9/index.php +++ b/web/edit/server/bind9/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_options'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." bind9-opt ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -43,7 +43,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." bind9 ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/clamd/index.php b/web/edit/server/clamd/index.php index 8041b8d0..29b8dcdf 100644 --- a/web/edit/server/clamd/index.php +++ b/web/edit/server/clamd/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." clamd ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/cron/index.php b/web/edit/server/cron/index.php index 3b080197..16736b0b 100644 --- a/web/edit/server/cron/index.php +++ b/web/edit/server/cron/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." cron ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/crond/index.php b/web/edit/server/crond/index.php index fdac7def..c35174c9 100644 --- a/web/edit/server/crond/index.php +++ b/web/edit/server/crond/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." crond ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/dovecot/index.php b/web/edit/server/dovecot/index.php index 5e217134..9e8015a9 100644 --- a/web/edit/server/dovecot/index.php +++ b/web/edit/server/dovecot/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -43,7 +43,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config1'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-1 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -56,7 +56,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config2'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-2 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -69,7 +69,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config3'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-3 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -82,7 +82,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config4'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-4 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -95,7 +95,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config5'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-5 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -108,7 +108,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config6'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-6 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -121,7 +121,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config7'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-7 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); @@ -134,7 +134,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config8'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." dovecot-8 " .$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/exim/index.php b/web/edit/server/exim/index.php index 65a069f0..4cce7720 100644 --- a/web/edit/server/exim/index.php +++ b/web/edit/server/exim/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." exim ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/exim4/index.php b/web/edit/server/exim4/index.php index 163f0a0d..3aa66cf0 100644 --- a/web/edit/server/exim4/index.php +++ b/web/edit/server/exim4/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." exim4 ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/fail2ban/index.php b/web/edit/server/fail2ban/index.php index 7194e00b..98f5ff53 100644 --- a/web/edit/server/fail2ban/index.php +++ b/web/edit/server/fail2ban/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." fail2ban ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/httpd/index.php b/web/edit/server/httpd/index.php index 159c687b..05864a97 100644 --- a/web/edit/server/httpd/index.php +++ b/web/edit/server/httpd/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." httpd ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/mariadb/index.php b/web/edit/server/mariadb/index.php index c30c259b..bf9d9fb6 100644 --- a/web/edit/server/mariadb/index.php +++ b/web/edit/server/mariadb/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." mariadb ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/mysql/index.php b/web/edit/server/mysql/index.php index 6fcacf0b..a0dcc72e 100644 --- a/web/edit/server/mysql/index.php +++ b/web/edit/server/mysql/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." mysql ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/mysqld/index.php b/web/edit/server/mysqld/index.php index 865eaff2..7c8548ed 100644 --- a/web/edit/server/mysqld/index.php +++ b/web/edit/server/mysqld/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." mysqld ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/named/index.php b/web/edit/server/named/index.php index 3370d353..6fc04a9c 100644 --- a/web/edit/server/named/index.php +++ b/web/edit/server/named/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." named ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/nginx/index.php b/web/edit/server/nginx/index.php index 3eb1ab85..f9da848a 100644 --- a/web/edit/server/nginx/index.php +++ b/web/edit/server/nginx/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." nginx ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/php-fpm/index.php b/web/edit/server/php-fpm/index.php index ea6d653d..c2c2413f 100644 --- a/web/edit/server/php-fpm/index.php +++ b/web/edit/server/php-fpm/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." php ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/php/index.php b/web/edit/server/php/index.php index ea6d653d..c2c2413f 100644 --- a/web/edit/server/php/index.php +++ b/web/edit/server/php/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." php ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/php5-fpm/index.php b/web/edit/server/php5-fpm/index.php index ea6d653d..c2c2413f 100644 --- a/web/edit/server/php5-fpm/index.php +++ b/web/edit/server/php5-fpm/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." php ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/postgresql/index.php b/web/edit/server/postgresql/index.php index f679c59d..abd003e1 100644 --- a/web/edit/server/postgresql/index.php +++ b/web/edit/server/postgresql/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_options'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." postgresql-hba ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/proftpd/index.php b/web/edit/server/proftpd/index.php index 9cf45eab..32ffd125 100644 --- a/web/edit/server/proftpd/index.php +++ b/web/edit/server/proftpd/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." proftpd ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/spamassassin/index.php b/web/edit/server/spamassassin/index.php index 13d89983..afd1330b 100644 --- a/web/edit/server/spamassassin/index.php +++ b/web/edit/server/spamassassin/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." spamassassin ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/spamd/index.php b/web/edit/server/spamd/index.php index 843cc580..95f720a5 100644 --- a/web/edit/server/spamd/index.php +++ b/web/edit/server/spamd/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." spamd ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output); diff --git a/web/edit/server/vsftpd/index.php b/web/edit/server/vsftpd/index.php index 20e29264..ed26924c 100644 --- a/web/edit/server/vsftpd/index.php +++ b/web/edit/server/vsftpd/index.php @@ -30,7 +30,7 @@ if (!empty($_POST['save'])) { $new_conf = $mktemp_output[0]; $fp = fopen($new_conf, 'w'); fwrite($fp, str_replace("\r\n", "\n", $_POST['v_config'])); - fclose($new_conf); + fclose($fp); exec (VESTA_CMD."v-change-sys-service-config ".$new_conf." vsftpd ".$v_restart, $output, $return_var); check_return_code($return_var,$output); unset($output);