12 Commits 3e94a5a984 ... e08fd44e91

Auteur SHA1 Message Date
  Zhipeng e08fd44e91 Revert ""modify 格式修改"" il y a 4 ans
  Zhipeng 489eb063ce Revert ""modify 修改备注"" il y a 4 ans
  Zhipeng a091570e9a Revert ""modify 修改备注"" il y a 4 ans
  Zhipeng 98127b6ab4 Revert ""modify 修改备注"" il y a 4 ans
  Zhipeng ad89dbd7b7 Revert ""modify 修改备注"" il y a 4 ans
  Zhipeng aa8c17a4c7 Revert ""modify 修改备注"" il y a 4 ans
  Zhipeng 329a884299 Revert ""modify 增加注释"" il y a 4 ans
  Zhipeng fda4733dde "modify 增加注释" il y a 4 ans
  Zhipeng f3928ace3e "modify 增加注释" il y a 4 ans
  Zhipeng b29a5c3125 "modify 格式修改" il y a 4 ans
  Zhipeng 073a98d868 "modify 格式修改" il y a 4 ans
  Zhipeng aceae20ead "modify 格式修改" il y a 4 ans
2 fichiers modifiés avec 11 ajouts et 11 suppressions
  1. 7 8
      supervisor/install.sh
  2. 4 3
      supervisor/uninstall.sh

+ 7 - 8
supervisor/install.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-#Read parameters
+# Read parameters
 echo "Please input the configuration file name"
 read conf
 echo "Please input the program"
@@ -14,25 +14,24 @@ read command
 echo "Please input the directory"
 read directory
 
-#Copy the configuration file in the supervisor.d folder
+# Copy the configuration file in the supervisor.d folder
 served="/etc/supervisord.d"
 if [ -f "$served/$conf" ]
 then
-	echo "The service has already existed"
-	exit 1
+	  echo "The service has already existed"
+	  exit 1
 else
 # The first position is server.conf File installation directory
-	cp server.conf $served/$conf
+	  cp server.conf $served/$conf
 fi
 
-#替换变量
-
+# Variable substitution
 sed -i "s#PROGRAM#$program#g" $served/$conf
 sed -i "s#PROCESS_NAME#$process_name#g" $served/$conf
 sed -i "s#USER#$user#g" $served/$conf
 sed -i "s#DIRECTORY#$directory#g" $served/$conf
 sed -i "s#COMMAND#$command#g" $served/$conf
 
-#重读supervisor配置文件
+# Reread supervisor's configuration file
 supervisorctl update
 

+ 4 - 3
supervisor/uninstall.sh

@@ -1,19 +1,20 @@
 #!/bin/bash
 
-#Read service name you want to uninstall
+# Read service name you want to uninstall
 echo "Please input the service you want to uninstall"
 read conf
 served="/etc/supervisord.d"
 if [ ! -f "$served/$conf" ]
 then
-	echo "The service is not existing"
-	exit 1
+    echo "The service is not existing"
+	  exit 1
 fi
 
 
 echo "Are you sure uninstall ${conf}? y/n"
 read flag
 
+# Make sure the input is y or n
 until [ "y" == ${flag} ] || [ "n" == ${flag} ]
 do
         echo "Please input y/n again"