aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/nar-herder.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/nar-herder.in b/scripts/nar-herder.in
index c572106..e6f4a0b 100644
--- a/scripts/nar-herder.in
+++ b/scripts/nar-herder.in
@@ -322,6 +322,12 @@
"error: you must specify --mirror or --storage\n")
(exit 1))
+ (and=> (assq-ref opts 'pid-file)
+ (lambda (pid-file)
+ (call-with-output-file pid-file
+ (lambda (port)
+ (simple-format port "~A\n" (getpid))))))
+
(and=>
(assq-ref opts 'mirror)
(lambda (mirror)
@@ -340,11 +346,6 @@
(let ((database (setup-database (assq-ref opts 'database)))
(canonical-storage (and=> (assq-ref opts 'storage)
canonicalize-path)))
- (and=> (assq-ref opts 'pid-file)
- (lambda (pid-file)
- (call-with-output-file pid-file
- (lambda (port)
- (simple-format port "~A\n" (getpid))))))
(when (not (file-exists? (assq-ref opts 'database-dump)))
(log-msg 'INFO "dumping database...")