Browse Source

compact syntax for web restart

Serghey Rodin 9 years ago
parent
commit
bea30a0896
1 changed files with 7 additions and 9 deletions
  1. 7 9
      bin/v-add-web-domain

+ 7 - 9
bin/v-add-web-domain

@@ -174,15 +174,13 @@ echo "DOMAIN='$domain' IP='$ip' IP6='' ALIAS='$ALIAS' TPL='$WEB_TEMPLATE'\
  SUSPENDED='no' TIME='$time' DATE='$date'" >> $USER_DATA/web.conf
 
 # Restarting web server
-if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web
-    check_result $? "Web restart failed" >/dev/null
-
-    # Restarting proxy server
-    if [ ! -z "$PROXY_SYSTEM" ]; then
-        $BIN/v-restart-proxy
-        check_result $? "Proxy restart failed" >/dev/null
-    fi
+$BIN/v-restart-web $restart
+check_result $? "Web restart failed" >/dev/null
+
+# Restarting proxy server
+if [ ! -z "$PROXY_SYSTEM" ]; then
+    $BIN/v-restart-proxy $restart
+    check_result $? "Proxy restart failed" >/dev/null
 fi
 
 # Logging