From d9adcc50bff35005a8728cc4437c21eec6c10e83 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Tue, 2 Apr 2024 15:16:02 +0800 Subject: [PATCH] Script Refactoring --- cmd/openim-no-port/main.go | 19 +++++++++++++++++++ scripts-new/stop.sh | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 cmd/openim-no-port/main.go diff --git a/cmd/openim-no-port/main.go b/cmd/openim-no-port/main.go new file mode 100644 index 000000000..f0f428ff6 --- /dev/null +++ b/cmd/openim-no-port/main.go @@ -0,0 +1,19 @@ +package main + +import ( + "flag" + "fmt" + "time" +) + +func main() { + // Define flags + index := flag.Int("i", 0, "Index number") + config := flag.String("c", "", "Configuration path") + + // Parse the flags + flag.Parse() + // Print the values of the flags + fmt.Printf("args: -i %d -c %s\n", *index, *config) + time.Sleep(500 * time.Second) +} diff --git a/scripts-new/stop.sh b/scripts-new/stop.sh index 2e222c4a4..2ea534525 100644 --- a/scripts-new/stop.sh +++ b/scripts-new/stop.sh @@ -20,3 +20,5 @@ if [ $ret_val -ne 0 ]; then echo "no stop..." exit 1 fi + +echo "all stop" \ No newline at end of file