|
|
|
@ -3,17 +3,17 @@ package main |
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"encoding/json" |
|
|
|
"encoding/json" |
|
|
|
//"flag"
|
|
|
|
//"flag"
|
|
|
|
"log" |
|
|
|
"github.com/BurntSushi/toml" |
|
|
|
|
|
|
|
common "github.com/curusarn/resh/common" |
|
|
|
"io/ioutil" |
|
|
|
"io/ioutil" |
|
|
|
"path/filepath" |
|
|
|
"log" |
|
|
|
|
|
|
|
"net/http" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
"os/exec" |
|
|
|
"os/exec" |
|
|
|
"os/user" |
|
|
|
"os/user" |
|
|
|
|
|
|
|
"path/filepath" |
|
|
|
"strconv" |
|
|
|
"strconv" |
|
|
|
"strings" |
|
|
|
"strings" |
|
|
|
"net/http" |
|
|
|
|
|
|
|
common "github.com/curusarn/resh/common" |
|
|
|
|
|
|
|
"github.com/BurntSushi/toml" |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
func main() { |
|
|
|
func main() { |
|
|
|
@ -148,7 +148,6 @@ func isDaemonRunning(port int) (bool, error) { |
|
|
|
return true, nil |
|
|
|
return true, nil |
|
|
|
//body, err := ioutil.ReadAll(resp.Body)
|
|
|
|
//body, err := ioutil.ReadAll(resp.Body)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// dat, err := ioutil.ReadFile(pidfile)
|
|
|
|
// dat, err := ioutil.ReadFile(pidfile)
|
|
|
|
// if err != nil {
|
|
|
|
// if err != nil {
|
|
|
|
// log.Println("Reading pid file failed", err)
|
|
|
|
// log.Println("Reading pid file failed", err)
|
|
|
|
|