mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
guix-daemon.service.in: Make service restartable.
Currently the service cannot be restarted, because the gnu store mount makes it read-only. So fix this by removing the mount when starting the service. "-" to accept failures, in case the command doesn't finish successfully, chances are, the store can be mounted as RW, so continue. "+" to run as root Fixes: #4744 * etc/guix-daemon.service.in (Service)<ExecStartPre>: Stop gnu-store.mount (Service)<ExecStartPost>: Start gnu-store.mount Change-Id: I296f5d8805497f8a7364b68d627eb6d4fc05dbff
This commit is contained in:
parent
a2df6c460f
commit
9a78e76076
1 changed files with 6 additions and 0 deletions
|
|
@ -14,6 +14,12 @@ ExecStart=@localstatedir@/guix/profiles/per-user/root/current-guix/bin/guix-daem
|
|||
--substitute-urls='@GUIX_SUBSTITUTE_URLS@'
|
||||
Environment='GUIX_STATE_DIRECTORY=@localstatedir@/guix' 'GUIX_LOCPATH=@localstatedir@/guix/profiles/per-user/root/guix-profile/lib/locale' LC_ALL=en_US.utf8
|
||||
|
||||
# Stop the gnu-store.mount so that the daemon can capture the store as
|
||||
# read-write in its private mount namespace.
|
||||
# See <https://codeberg.org/guix/guix/issues/4744>.
|
||||
ExecStartPre=-+systemctl stop gnu-store.mount
|
||||
ExecStartPost=-+systemctl start gnu-store.mount --no-block
|
||||
|
||||
# Run under a dedicated unprivileged user account.
|
||||
User=guix-daemon
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue