summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-05-15 12:30:41 +0200
committerRuben Pollan <meskio@sindominio.net>2018-05-26 12:54:51 +0200
commit3681fd33051eec54d79542205c7409c3573399bf (patch)
tree78e727fccffa691375aa0112e1196c952c21ee36
parent8382f3b14a6e82f0359a4fe68aee077c1c8665ef (diff)
[feat] create config folder if it doesn't exist
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.go b/main.go
index a671c26..146a814 100644
--- a/main.go
+++ b/main.go
@@ -32,6 +32,10 @@ const (
var printer *message.Printer
func main() {
+ if _, err := os.Stat(bitmask.ConfigPath); os.IsNotExist(err) {
+ os.MkdirAll(bitmask.ConfigPath, os.ModePerm)
+ }
+
err := acquirePID()
if err != nil {
log.Fatal(err)
@@ -46,6 +50,7 @@ func main() {
b, err := bitmask.Init()
if err != nil {
log.Print(err)
+ notify.bitmaskNotRunning()
return
}
defer b.Close()