Fix Hitch reload action

This commit is contained in:
2026-04-02 15:11:02 +02:00
parent d49644c083
commit 7ffffb255b

View File

@@ -95,22 +95,10 @@
(define (hitch-reload-procedure package)
#~(lambda _
(use-modules (ice-9 popen)
(ice-9 rdelim))
(let* ((port (open-pipe* OPEN_READ
#$(file-append procps "/bin/pidof")
"hitch"))
(line (read-line port))
(status (close-pipe port)))
(and (zero? status)
(string? line)
(not (eof-object? line))
(let ((pid (string->number
(car (string-tokenize line)))))
(and pid
(zero? (system* #$(file-append coreutils "/bin/kill")
"-HUP"
(number->string pid)))))))))
(zero? (system* #$(file-append procps "/bin/pkill")
"-HUP"
"-x"
"hitch"))))
(define (hitch-shepherd-services config)
(let ((config-file (hitch-config-file config))