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