Browse Source

mastostart-gnu: Aggiusta symlink webroot->store.

* mastostart-gnu/services/mastostart.scm (mastostart-service-type)
[start]: Rimuovi la webroot creata da httpd-service-type e
sostituiscila con il symlink allo store.
Giacomo Leidi 4 years ago
parent
commit
fdff3865ee
1 changed files with 7 additions and 5 deletions
  1. 7 5
      mastostart-gnu/services/mastostart.scm

+ 7 - 5
mastostart-gnu/services/mastostart.scm

@@ -46,11 +46,13 @@
       (one-shot? #t)
       (requirement '(httpd mysql))
       (documentation "Start serving the MastodonStartpage.")
-      (start #~(make-forkexec-constructor
-                (list (string-append #$coreutils "/bin/ln")
-                      "-s"
-                      (string-append #$mastostart "/web/")
-                      #$webroot)))
+      (start #~(lambda _
+                 (invoke #$(file-append coreutils "/bin/rm") "-rf"
+                         #$webroot)
+                 (invoke
+                        #$(file-append coreutils "/bin/ln") "-s"
+                        #$(file-append mastostart "/web")
+                        #$webroot)))
       (stop #~(make-kill-destructor))))))
 
 (define mastostart-service-type