|
@@ -77,15 +77,17 @@
|
|
|
(one-shot? #t)
|
|
|
(requirement '(httpd mysql))
|
|
|
(documentation "Start serving the MastodonStartpage.")
|
|
|
- (start #~(lambda _
|
|
|
- (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)))
|
|
|
+ (start (with-imported-modules '((ice-9 ftw))
|
|
|
+ #~(lambda _
|
|
|
+ (use-modules (ice-9 ftw))
|
|
|
+ (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
|