mkdir /var/run/warrend incase its not there

This commit is contained in:
Dan Ballard 2015-02-21 17:24:11 -08:00
parent 822f8624bd
commit 3ee37ccb43
2 changed files with 5 additions and 0 deletions

View File

@ -89,6 +89,10 @@ func checkRunning() bool {
func initRunning() {
// rm old sock
os.Remove(warren.CmdSockAddr)
// incase gone
os.Mkdir(warren.WarrendRunDir, 0775)
// drop down pid
pidfile, err := os.Create(warren.WarrendPidFile)
if err != nil {

View File

@ -11,6 +11,7 @@ import (
)
const CmdSockType string = "unix"
const WarrendRunDir string = "/var/run/warrend"
const CmdSockAddr string = "/var/run/warrend/warrend.sock"
const WarrendPidFile string = "/var/run/warrend/warrend.pid"
const WarrendConf string = "/etc/warrend.json"