diff --git a/build/agent/PKGBUILD b/build/agent/PKGBUILD index 011386b..e0c477e 100644 --- a/build/agent/PKGBUILD +++ b/build/agent/PKGBUILD @@ -80,7 +80,9 @@ package__ubuntu_noble() { postinst__apt() { if [ -d /run/systemd/system ]; then systemctl daemon-reload &>/dev/null || : - if [ "$1" = "configure" ] && [ -z "$2" ]; then + # Enable on both fresh install and upgrade so the [Install] WantedBy= + # symlink is always reconciled against the current unit (self-healing). + if [ "$1" = "configure" ]; then systemctl enable service-discover.service &>/dev/null || : fi fi @@ -91,7 +93,9 @@ postinst__apt() { postinst__yum() { if [ -d /run/systemd/system ]; then systemctl daemon-reload &>/dev/null || : - if [ $1 -eq 1 ]; then + # Enable on both fresh install ($1 -eq 1) and upgrade ($1 -eq 2) so the + # [Install] WantedBy= symlink is always reconciled (self-healing). + if [ $1 -ge 1 ]; then systemctl enable service-discover.service &>/dev/null || : fi fi diff --git a/build/server/PKGBUILD b/build/server/PKGBUILD index d48a466..7f750ce 100644 --- a/build/server/PKGBUILD +++ b/build/server/PKGBUILD @@ -79,7 +79,9 @@ package__ubuntu_noble() { postinst__apt() { if [ -d /run/systemd/system ]; then systemctl daemon-reload &>/dev/null || : - if [ "$1" = "configure" ] && [ -z "$2" ]; then + # Enable on both fresh install and upgrade so the [Install] WantedBy= + # symlink is always reconciled against the current unit (self-healing). + if [ "$1" = "configure" ]; then systemctl enable service-discover.service &>/dev/null || : fi fi @@ -90,7 +92,9 @@ postinst__apt() { postinst__yum() { if [ -d /run/systemd/system ]; then systemctl daemon-reload &>/dev/null || : - if [ $1 -eq 1 ]; then + # Enable on both fresh install ($1 -eq 1) and upgrade ($1 -eq 2) so the + # [Install] WantedBy= symlink is always reconciled (self-healing). + if [ $1 -ge 1 ]; then systemctl enable service-discover.service &>/dev/null || : fi fi diff --git a/release.config.mjs b/release.config.mjs index af966bb..6559869 100644 --- a/release.config.mjs +++ b/release.config.mjs @@ -8,7 +8,7 @@ * @type {import('semantic-release').GlobalConfig} */ export default { - branches: ['devel'], + branches: ['main'], tagFormat: "${version}", plugins: [ [