mkdir /var/run/warrend incase its not there
This commit is contained in:
parent
822f8624bd
commit
3ee37ccb43
|
@ -89,6 +89,10 @@ func checkRunning() bool {
|
||||||
func initRunning() {
|
func initRunning() {
|
||||||
// rm old sock
|
// rm old sock
|
||||||
os.Remove(warren.CmdSockAddr)
|
os.Remove(warren.CmdSockAddr)
|
||||||
|
|
||||||
|
// incase gone
|
||||||
|
os.Mkdir(warren.WarrendRunDir, 0775)
|
||||||
|
|
||||||
// drop down pid
|
// drop down pid
|
||||||
pidfile, err := os.Create(warren.WarrendPidFile)
|
pidfile, err := os.Create(warren.WarrendPidFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -11,6 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const CmdSockType string = "unix"
|
const CmdSockType string = "unix"
|
||||||
|
const WarrendRunDir string = "/var/run/warrend"
|
||||||
const CmdSockAddr string = "/var/run/warrend/warrend.sock"
|
const CmdSockAddr string = "/var/run/warrend/warrend.sock"
|
||||||
const WarrendPidFile string = "/var/run/warrend/warrend.pid"
|
const WarrendPidFile string = "/var/run/warrend/warrend.pid"
|
||||||
const WarrendConf string = "/etc/warrend.json"
|
const WarrendConf string = "/etc/warrend.json"
|
||||||
|
|
Loading…
Reference in New Issue