Compare commits

...
Author SHA1 Message Date
MickLesk e43e330ff6 deCONZ: keep the service unit in /etc/systemd/system
The package ships /lib/systemd/system/deconz.service with User=1000, so every
deconz upgrade replaced our unit there and the service failed with 217/USER
after the next daemon-reload or reboot. The install now writes the unit to
/etc/systemd/system, which dpkg leaves alone. The update writes it there once
for existing installs, also for those whose unit an upgrade already replaced.
2026-11-20 17:28:31 +01:00
2 changed files with 24 additions and 1 deletions

No files matched your search

+23
View File
@@ -29,6 +29,29 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
if [[ ! -f /etc/systemd/system/deconz.service ]]; then
msg_info "Moving Service to /etc/systemd/system"
# A deconz upgrade overwrites /lib/systemd/system/deconz.service with its own User=1000 unit
cat <<EOF >/etc/systemd/system/deconz.service
[Unit]
Description=deCONZ: ZigBee gateway -- REST API
Wants=deconz-init.service deconz-update.service
StartLimitIntervalSec=0
[Service]
User=root
ExecStart=/usr/bin/deCONZ -platform minimal --http-port=80
Restart=on-failure
RestartSec=30
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_KILL CAP_SYS_BOOT CAP_SYS_TIME
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl reenable -q deconz
msg_ok "Moved Service to /etc/systemd/system"
fi
msg_info "Updating deCONZ"
apt_update_safe
$STD apt upgrade -y
+1 -1
View File
@@ -31,7 +31,7 @@ rm -rf "$libssl"
msg_ok "Installed deConz"
msg_info "Creating Service"
cat <<EOF >/lib/systemd/system/deconz.service
cat <<EOF >/etc/systemd/system/deconz.service
[Unit]
Description=deCONZ: ZigBee gateway -- REST API
Wants=deconz-init.service deconz-update.service