mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 11:52:10 +08:00
Script Refactoring
This commit is contained in:
parent
1b45539b77
commit
d9adcc50bf
19
cmd/openim-no-port/main.go
Normal file
19
cmd/openim-no-port/main.go
Normal file
@ -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)
|
||||||
|
}
|
||||||
@ -20,3 +20,5 @@ if [ $ret_val -ne 0 ]; then
|
|||||||
echo "no stop..."
|
echo "no stop..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "all stop"
|
||||||
Loading…
x
Reference in New Issue
Block a user