Move crio default sock to /var/run/crio/crio.sock

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2017-10-17 15:44:38 -07:00
parent f237cdb2a5
commit 761e73c82e
8 changed files with 12 additions and 7 deletions

View file

@ -8,6 +8,7 @@ import (
_ "net/http/pprof"
"os"
"os/signal"
"path/filepath"
"sort"
"strings"
@ -424,6 +425,10 @@ func main() {
return fmt.Errorf("invalid --runtime value %q", err)
}
if err := os.MkdirAll(filepath.Dir(config.Listen), 0755); err != nil {
return err
}
// Remove the socket if it already exists
if _, err := os.Stat(config.Listen); err == nil {
if err := os.Remove(config.Listen); err != nil {