|
@@ -0,0 +1,26 @@
|
|
|
|
+#!/bin/bash
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#Read parameters
|
|
|
|
+echo "Please input the configuration file name"
|
|
|
|
+read conf
|
|
|
|
+echo "Please input the program"
|
|
|
|
+read program
|
|
|
|
+echo "Please input the process_name"
|
|
|
|
+read process_name
|
|
|
|
+echo "Please input the user"
|
|
|
|
+read user
|
|
|
|
+echo "Please input the command"
|
|
|
|
+read command
|
|
|
|
+echo "Please input the directory"
|
|
|
|
+read directory
|
|
|
|
+
|
|
|
|
+#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
|
|
|
|
+else
|
|
|
|
+# The first position is server.conf File installation directory
|
|
|
|
+cp server.conf $served/$conf
|