diff --git a/bin/v-restart-cron b/bin/v-restart-cron index 691b41457..aaba3ad2e 100755 --- a/bin/v-restart-cron +++ b/bin/v-restart-cron @@ -19,14 +19,9 @@ source $VESTA/func/main.sh #----------------------------------------------------------# if [ ! -z "$CRON_SYSTEM" ]; then - /etc/init.d/$CRON_SYSTEM status >/dev/null 2>&1 - if [ $? -eq 0 ]; then - /etc/init.d/$CRON_SYSTEM reload >/dev/null 2>&1 - if [ $? -ne 0 ]; then - exit $E_RESTART - fi - else - /etc/init.d/$CRON_SYSTEM start >/dev/null 2>&1 + /etc/init.d/$CRON_SYSTEM reload >/dev/null 2>&1 + if [ $? -ne 0 ]; then + /etc/init.d/$CRON_SYSTEM restart >/dev/null 2>&1 if [ $? -ne 0 ]; then exit $E_RESTART fi diff --git a/bin/v-restart-dns b/bin/v-restart-dns index d4392eb81..49f936622 100755 --- a/bin/v-restart-dns +++ b/bin/v-restart-dns @@ -19,14 +19,9 @@ source $VESTA/func/main.sh #----------------------------------------------------------# if [ ! -z "$DNS_SYSTEM" ]; then - /etc/init.d/$DNS_SYSTEM status >/dev/null 2>&1 - if [ $? -eq 0 ]; then - /etc/init.d/$DNS_SYSTEM reload >/dev/null 2>&1 - if [ $? -ne 0 ]; then - exit $E_RESTART - fi - else - /etc/init.d/$DNS_SYSTEM start >/dev/null 2>&1 + /etc/init.d/$DNS_SYSTEM reload >/dev/null 2>&1 + if [ $? -ne 0 ]; then + /etc/init.d/$DNS_SYSTEM restart >/dev/null 2>&1 if [ $? -ne 0 ]; then exit $E_RESTART fi diff --git a/bin/v-restart-ftp b/bin/v-restart-ftp index fb907dd98..a9fa521d1 100755 --- a/bin/v-restart-ftp +++ b/bin/v-restart-ftp @@ -19,14 +19,9 @@ source $VESTA/func/main.sh #----------------------------------------------------------# if [ ! -z "$FTP_SYSTEM" ]; then - /etc/init.d/$FTP_SYSTEM status >/dev/null 2>&1 - if [ $? -eq 0 ]; then - /etc/init.d/$FTP_SYSTEM reload >/dev/null 2>&1 - if [ $? -ne 0 ]; then - exit $E_RESTART - fi - else - /etc/init.d/$FTP_SYSTEM start >/dev/null 2>&1 + /etc/init.d/$FTP_SYSTEM reload >/dev/null 2>&1 + if [ $? -ne 0 ]; then + /etc/init.d/$FTP_SYSTEM restart >/dev/null 2>&1 if [ $? -ne 0 ]; then exit $E_RESTART fi diff --git a/bin/v-restart-mail b/bin/v-restart-mail index 2888ec042..c39a5e6d4 100755 --- a/bin/v-restart-mail +++ b/bin/v-restart-mail @@ -19,14 +19,9 @@ source $VESTA/func/main.sh #----------------------------------------------------------# if [ ! -z "$MAIL_SYSTEM" ]; then - /etc/init.d/$MAIL_SYSTEM status >/dev/null 2>&1 - if [ $? -eq 0 ]; then - /etc/init.d/$MAIL_SYSTEM reload >/dev/null 2>&1 - if [ $? -ne 0 ]; then - exit $E_RESTART - fi - else - /etc/init.d/$MAIL_SYSTEM start >/dev/null 2>&1 + /etc/init.d/$MAIL_SYSTEM reload >/dev/null 2>&1 + if [ $? -ne 0 ]; then + /etc/init.d/$MAIL_SYSTEM restart >/dev/null 2>&1 if [ $? -ne 0 ]; then exit $E_RESTART fi diff --git a/bin/v-restart-proxy b/bin/v-restart-proxy index 3f7311faf..dea79990f 100755 --- a/bin/v-restart-proxy +++ b/bin/v-restart-proxy @@ -19,14 +19,9 @@ source $VESTA/func/main.sh #----------------------------------------------------------# if [ ! -z "$PROXY_SYSTEM" ]; then - /etc/init.d/$PROXY_SYSTEM status >/dev/null 2>&1 - if [ $? -eq 0 ]; then - /etc/init.d/$PROXY_SYSTEM reload >/dev/null 2>&1 - if [ $? -ne 0 ]; then - exit $E_RESTART - fi - else - /etc/init.d/$PROXY_SYSTEM start >/dev/null 2>&1 + /etc/init.d/$PROXY_SYSTEM reload >/dev/null 2>&1 + if [ $? -ne 0 ]; then + /etc/init.d/$PROXY_SYSTEM restart >/dev/null 2>&1 if [ $? -ne 0 ]; then exit $E_RESTART fi diff --git a/bin/v-restart-web b/bin/v-restart-web index abfa58035..bcc2b639d 100755 --- a/bin/v-restart-web +++ b/bin/v-restart-web @@ -19,14 +19,9 @@ source $VESTA/func/main.sh #----------------------------------------------------------# if [ ! -z "$WEB_SYSTEM" ]; then - /etc/init.d/$WEB_SYSTEM status >/dev/null 2>&1 - if [ $? -eq 0 ]; then - /etc/init.d/$WEB_SYSTEM reload >/dev/null 2>&1 - if [ $? -ne 0 ]; then - exit $E_RESTART - fi - else - /etc/init.d/$WEB_SYSTEM start >/dev/null 2>&1 + /etc/init.d/$WEB_SYSTEM reload >/dev/null 2>&1 + if [ $? -ne 0 ]; then + /etc/init.d/$WEB_SYSTEM restart >/dev/null 2>&1 if [ $? -ne 0 ]; then exit $E_RESTART fi