mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-04-24 23:47:50 -05:00
Create state folder on backend launch
This commit is contained in:
parent
cd530ca913
commit
7078a37f36
6
main.go
6
main.go
|
|
@ -72,6 +72,12 @@ type RPCPacket struct {
|
|||
|
||||
// backendMain starts all the servers and creates an RPC server to communicate with the frontend
|
||||
func backendMain(noSignal, noReload bool) {
|
||||
err := os.Mkdir("state", 0755)
|
||||
if err != nil && !os.IsExist(err) {
|
||||
logging.Error("BACKEN", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
sigExit := make(chan os.Signal, 1)
|
||||
signal.Notify(sigExit, syscall.SIGINT, syscall.SIGTERM)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user