diff --git a/web/edit/server/apache2/index.php b/web/edit/server/apache2/index.php index d3c79bcb9..10eddb7cb 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 155e8176e..bbe7e5634 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 8041b8d0c..29b8dcdf0 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 3b0801970..16736b0bd 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 fdac7defa..c35174c97 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 5e217134b..9e8015a93 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 65a069f02..4cce77209 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 163f0a0db..3aa66cf05 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 7194e00b5..98f5ff53d 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 159c687b7..05864a975 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 c30c259bd..bf9d9fb68 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 6fcacf0b4..a0dcc72e3 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 865eaff2d..7c8548ed2 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 3370d353e..6fc04a9c4 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 3eb1ab852..f9da848a1 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 ea6d653d2..c2c2413f3 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 ea6d653d2..c2c2413f3 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 ea6d653d2..c2c2413f3 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 f679c59df..abd003e12 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 9cf45eab9..32ffd125f 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 13d899832..afd1330b7 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 843cc5804..95f720a5d 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 20e29264f..ed26924ce 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);