From 401f4a89f84b0fa7962e6346c2406ffbf79da491 Mon Sep 17 00:00:00 2001 From: Noah Date: Tue, 2 Apr 2024 21:10:51 -0500 Subject: [PATCH] Attempt to create "sites" folder on start (fix #32) --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 03bd44d..168fe76 100644 --- a/main.go +++ b/main.go @@ -102,6 +102,11 @@ func main() { go handler(data) // Run the handler fmt.Fprint(w, "Received!") }) + // Attempt to create sites_dir + if exists, _ := fileExists(configuration.sites_dir); !exists { + os.Mkdir(configuration.sites_dir, 640) // Permissions are 640 (Owner: rw, Group: r, All: none) + } + log.Printf("Starting Lapis Deploy on port %d...", configuration.port) startAllSites() // Start all the servers