aboutsummaryrefslogtreecommitdiff
path: root/system/incus/install_sh.diff
blob: d3812e2737d4c4b69b6e0b98875ee6cbfbfb6074 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- ./internal/server/instance/drivers/agent-loader/install.sh.orig	2024-10-04 00:42:08.000000000 +1000
+++ ./internal/server/instance/drivers/agent-loader/install.sh	2024-10-08 11:50:40.672819166 +1100
@@ -31,6 +31,20 @@
 sed -i "s#TARGET#${TARGET}#g" "${TARGET}/systemd/system/incus-agent.service"
 sed -i "s#TARGET#${TARGET}#g" "${TARGET}/systemd/incus-agent-setup"
 
+# Support incus-agent for non-systemd systems.
+if [ -e /etc/slackware-version ]; then
+  cat <<EOF >>/etc/rc.d/rc.local
+
+if [ -x /lib/systemd/incus-agent-setup ]; then
+  /lib/systemd/incus-agent-setup
+  if [ -d /run/incus_agent ]; then
+    cd /run/incus_agent && /run/incus_agent/incus-agent &
+  fi
+fi
+
+EOF
+fi
+
 # Make sure systemd is aware of them.
 systemctl daemon-reload