summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-09-04 04:47:43 +0300
committerMaxim Devaev <[email protected]>2024-09-04 04:47:43 +0300
commit864a2af45e75be12db8f94687f8754f148121f1c (patch)
treecc61f9c3a39c3ad235e8e2d1d0fb679f31020137
parent5f26fa40728be4aa075c86a1a238381900e6b27b (diff)
kvmd-bootconfig: ensure avahi service on ENABLE_AVAHI
-rwxr-xr-xscripts/kvmd-bootconfig8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/kvmd-bootconfig b/scripts/kvmd-bootconfig
index d97f10fa..06f41dbb 100755
--- a/scripts/kvmd-bootconfig
+++ b/scripts/kvmd-bootconfig
@@ -53,7 +53,7 @@ source <(dos2unix < /boot/pikvm.txt)
rw
-# ========== First boot configuration ==========
+# ========== First boot and/or Avahi configuration ==========
make_avahi_service() {
local _serial
@@ -130,10 +130,10 @@ if [ -n "$FIRSTBOOT$FIRST_BOOT" ]; then
which fc-cache && fc-cache || true
fi
-
-# ========== Avahi ==========
-
if [ -n "$ENABLE_AVAHI" ]; then
+ if [ ! -f /etc/avahi/services/pikvm.service ]; then
+ make_avahi_service
+ fi
systemctl enable avahi-daemon || true
touch /boot/pikvm-reboot.txt
fi