summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roseh.moe.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/roseh.moe.go b/roseh.moe.go
index d28b1a5..094edfc 100644
--- a/roseh.moe.go
+++ b/roseh.moe.go
@@ -50,7 +50,7 @@ var (
secretsFile = flag.String("secrets", "secrets.xml", "secrets file")
configFile = flag.String("config", "config.xml", "configuration file (XML, baby!!)")
https = flag.String("https", "", "directory containing cert.pem and key.pem, or empty string to use unencrypted http")
- holeTempDir = flag.String("hole-temp-dir", "hole", "directory to store temporary files for the wormhole")
+ holeTempDir = flag.String("hole-temp-dir", "/tmp/hole", "directory to store temporary files for the wormhole")
nezuko = flag.String("nezuko", "/mnt/nezuko", "nezuko partition")
cgit = flag.String("cgit", "", "directory containing cgit.cgi")
cgitConfig = flag.String("cgit-config", "", "cgit config file")
@@ -1043,6 +1043,10 @@ func main() {
log.Fatal(err)
}
+ if err := os.MkdirAll(*holeTempDir, 0700); err != nil {
+ log.Fatal(err)
+ }
+
go func() {
for range time.NewTicker(2 * time.Hour).C {
if err := cleanHole(); err != nil {