Create state folder on backend launch

This commit is contained in:
ppeb 2025-04-27 16:33:09 -05:00
parent cd530ca913
commit 7078a37f36
No known key found for this signature in database
GPG Key ID: CC147AD1B3D318D0

View File

@ -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)