Browse Source

脚本函数定义

tangs 6 years ago
parent
commit
46d90ae01c
1 changed files with 56 additions and 0 deletions
  1. 56 0
      server.sh

+ 56 - 0
server.sh

@@ -0,0 +1,56 @@
+#!/bin/bash
+#
+# Description: server
+#
+# Source function library
+. /etc/init.d/functions
+
+NAME=SERVER_NAME
+USER=SERVER_USER
+
+# Start the server
+start (){
+
+}
+
+# Stop the server
+stop (){
+
+}
+
+# Return the status of the server
+status (){
+
+}
+
+# Restart the server
+restart (){
+
+}
+
+usage (){
+
+}
+
+
+case $1 in
+start)
+	start
+	;;
+
+stop)
+	stop
+	;;
+
+restart)
+	restart
+	;;
+
+status)
+	status
+	;;
+*)
+	usage
+	exit 1
+	;;
+esac