diff options
author | Maxim Devaev <[email protected]> | 2024-09-04 04:47:43 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2024-09-04 04:47:43 +0300 |
commit | 864a2af45e75be12db8f94687f8754f148121f1c (patch) | |
tree | cc61f9c3a39c3ad235e8e2d1d0fb679f31020137 | |
parent | 5f26fa40728be4aa075c86a1a238381900e6b27b (diff) |
kvmd-bootconfig: ensure avahi service on ENABLE_AVAHI
-rwxr-xr-x | scripts/kvmd-bootconfig | 8 |
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 |