Giacomo Leidi 4 years ago
parent
commit
2fa3fd6fe3
1 changed files with 8 additions and 6 deletions
  1. 8 6
      mastostart-gnu/services/mastostart.scm

+ 8 - 6
mastostart-gnu/services/mastostart.scm

@@ -78,12 +78,14 @@
       (requirement '(httpd mysql))
       (documentation "Start serving the MastodonStartpage.")
       (start #~(lambda _
-                 (when (equal? (scandir #$webroot) '("." ".."))
-                   (invoke #$(file-append coreutils "/bin/rm") "-rf"
-                           #$webroot)
-                   (invoke #$(file-append coreutils "/bin/ln") "-s"
-                           #$(file-append mastostart "/web")
-                           #$webroot))))
+                 (if (equal? (scandir #$webroot) '("." ".."))
+                     (begin
+                       (invoke #$(file-append coreutils "/bin/rm") "-rf"
+                               #$webroot)
+                       (invoke #$(file-append coreutils "/bin/ln") "-s"
+                               #$(file-append mastostart "/web")
+                               #$webroot))
+                     #t)))
       (stop #~(make-kill-destructor))))))
 
 (define mastostart-service-type