summaryrefslogtreecommitdiff
path: root/etc/guix-install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'etc/guix-install.sh')
-rwxr-xr-xetc/guix-install.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 0d15a05cb4..06590ee97f 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -152,6 +152,10 @@ chk_init_sys()
_msg "${INF}init system is: sysv-init"
INIT_SYS="sysv-init"
return 0
+ elif [[ -d /etc/sv ]]; then
+ _msg "${INF}init system is: runit"
+ INIT_SYS="runit"
+ return 0
else
INIT_SYS="NA"
_err "${ERR}Init system could not be detected."
@@ -364,6 +368,13 @@ sys_enable_guix_daemon()
systemctl enable guix-daemon; } &&
_msg "${PAS}enabled Guix daemon via systemd"
;;
+ runit)
+ { cp -r "${ROOT_HOME}/.config/guix/current/lib/runit/guix-daemon" \
+ /etc/sv;
+ chmod 755 /etc/sv/guix-daemon/run;
+ ln -s /etc/sv/guix-daemon /etc/runit/runsvdir/default/; } &&
+ _msg "${PAS}enabled Guix daemon via runit"
+ ;;
sysv-init)
{ mkdir -p /etc/init.d;
cp "${ROOT_HOME}/.config/guix/current/etc/init.d/guix-daemon" \