Commit 1068644c authored by KT315's avatar KT315

Start/stop scripts in Golang

parent b2ca6bb4
go_dummy
\ No newline at end of file
Build:
$ go build go_dummy.go
Run:
$ ./go_dummy
\ No newline at end of file
......@@ -22,7 +22,7 @@ func main() {
http.HandleFunc("/", handler)
fmt.Printf("Go dummy is listening on %s\n", port)
fmt.Printf("Listening on %s\n", port)
if err := http.ListenAndServe(port, nil); err != nil {
panic(err)
......
#!/bin/bash
ulimit -n 100000
./go_dummy > log 2>&1 &
echo $! > pid
\ No newline at end of file
#!/bin/bash
kill $(cat pid)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment