Просмотр исходного кода

smarter way to use restart command in other scripts

Serghey Rodin 9 лет назад
Родитель
Сommit
51be240bd4
8 измененных файлов с 35 добавлено и 1 удалено
  1. 0 1
      bin/v-list-user-log
  2. 5 0
      bin/v-restart-cron
  3. 5 0
      bin/v-restart-dns
  4. 5 0
      bin/v-restart-ftp
  5. 5 0
      bin/v-restart-mail
  6. 5 0
      bin/v-restart-proxy
  7. 5 0
      bin/v-restart-web
  8. 5 0
      bin/v-restart-web-backend

+ 0 - 1
bin/v-list-user-log

@@ -24,7 +24,6 @@ json_list() {
     echo "{"
     for str in $logs; do
         eval $str
-        CMD=${CMD//\"/\\\"}
         echo -n '    "'$ID'": {
         "CMD": "'$CMD'",
         "UNDO": "'$UNDO'",

+ 5 - 0
bin/v-restart-cron

@@ -30,6 +30,11 @@ send_email_report() {
 #                       Action                             #
 #----------------------------------------------------------#
 
+# Exit
+if [ "$1" = "no" ]; then
+    exit
+fi
+
 # Schedule restart
 if [ "$1" = 'scheduled' ]; then
     echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe

+ 5 - 0
bin/v-restart-dns

@@ -35,6 +35,11 @@ send_email_report() {
 #                       Action                             #
 #----------------------------------------------------------#
 
+# Exit
+if [ "$1" = "no" ]; then
+    exit
+fi
+
 # Schedule restart
 if [ "$1" = 'scheduled' ]; then
     echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe

+ 5 - 0
bin/v-restart-ftp

@@ -30,6 +30,11 @@ send_email_report() {
 #                       Action                             #
 #----------------------------------------------------------#
 
+# Exit
+if [ "$1" = "no" ]; then
+    exit
+fi
+
 # Schedule restart
 if [ "$1" = 'scheduled' ]; then
     echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe

+ 5 - 0
bin/v-restart-mail

@@ -30,6 +30,11 @@ send_email_report() {
 #                       Action                             #
 #----------------------------------------------------------#
 
+# Exit
+if [ "$1" = "no" ]; then
+    exit
+fi
+
 # Schedule restart
 if [ "$1" = 'scheduled' ]; then
     echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe

+ 5 - 0
bin/v-restart-proxy

@@ -30,6 +30,11 @@ send_email_report() {
 #                       Action                             #
 #----------------------------------------------------------#
 
+# Exit
+if [ "$1" = "no" ]; then
+    exit
+fi
+
 # Schedule restart
 if [ "$1" = 'scheduled' ]; then
     echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe

+ 5 - 0
bin/v-restart-web

@@ -30,6 +30,11 @@ send_email_report() {
 #                       Action                             #
 #----------------------------------------------------------#
 
+# Exit
+if [ "$1" = "no" ]; then
+    exit
+fi
+
 # Schedule restart
 if [ "$1" = 'scheduled' ]; then
     echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe

+ 5 - 0
bin/v-restart-web-backend

@@ -30,6 +30,11 @@ send_email_report() {
 #                       Action                             #
 #----------------------------------------------------------#
 
+# Exit
+if [ "$1" = "no" ]; then
+    exit
+fi
+
 # Schedule restart
 if [ "$1" = 'scheduled' ]; then
     echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe