Skip to content

Commit 585fb9d

Browse files
committed
Create state folder on backend launch
1 parent aae2daf commit 585fb9d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ type RPCPacket struct {
7272

7373
// backendMain starts all the servers and creates an RPC server to communicate with the frontend
7474
func backendMain(noSignal, noReload bool) {
75+
err := os.Mkdir("state", 0755)
76+
if err != nil && !os.IsExist(err) {
77+
logging.Error("BACKEN", err)
78+
os.Exit(1)
79+
}
80+
7581
sigExit := make(chan os.Signal, 1)
7682
signal.Notify(sigExit, syscall.SIGINT, syscall.SIGTERM)
7783

0 commit comments

Comments
 (0)