#!/bin/bash set -e # remove stall activation link file if updated from <=1.2.6 if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt "1.2.7~~"; then if [ -e "/var/lib/wb-cloud-agent/telegraf.conf" ] && [ -e "/var/lib/wb-cloud-agent/activation_link.conf" ]; then echo "Controller seems to be in the cloud already, removing stall activation link" echo "unknown" > "/var/lib/wb-cloud-agent/activation_link.conf" fi fi grep -qF "+update-from-cloud " /var/lib/wb-image-update/firmware-compatible || echo -n "+update-from-cloud " >> /var/lib/wb-image-update/firmware-compatible # Automatically added by dh_installdeb/13.3.4 dpkg-maintscript-helper rm_conffile /etc/nginx/sites-available/wb-cloud-agent 1.0.0 wb-cloud-agent -- "$@" # End automatically added section # Automatically added by dh_installsystemd/13.3.4 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # This will only remove masks created by d-s-h on package removal. deb-systemd-helper unmask 'wb-cloud-agent.service' >/dev/null || true # was-enabled defaults to true, so new installations run enable. if deb-systemd-helper --quiet was-enabled 'wb-cloud-agent.service'; then # Enables the unit on first installation, creates new # symlinks on upgrades if the unit file has changed. deb-systemd-helper enable 'wb-cloud-agent.service' >/dev/null || true else # Update the statefile to add new symlinks (if any), which need to be # cleaned up on purge. Also remove old symlinks. deb-systemd-helper update-state 'wb-cloud-agent.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_installsystemd/13.3.4 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -d /run/systemd/system ]; then systemctl --system daemon-reload >/dev/null || true if [ -n "$2" ]; then _dh_action=restart else _dh_action=start fi deb-systemd-invoke $_dh_action 'wb-cloud-agent.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_installsystemd/13.3.4 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if deb-systemd-helper debian-installed 'wb-cloud-agent-telegraf.service'; then # This will only remove masks created by d-s-h on package removal. deb-systemd-helper unmask 'wb-cloud-agent-telegraf.service' >/dev/null || true if deb-systemd-helper --quiet was-enabled 'wb-cloud-agent-telegraf.service'; then # Create new symlinks, if any. deb-systemd-helper enable 'wb-cloud-agent-telegraf.service' >/dev/null || true fi fi # Update the statefile to add new symlinks (if any), which need to be cleaned # up on purge. Also remove old symlinks. deb-systemd-helper update-state 'wb-cloud-agent-telegraf.service' >/dev/null || true fi # End automatically added section # Automatically added by dh_installsystemd/13.3.4 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if deb-systemd-helper debian-installed 'wb-cloud-agent-frpc.service'; then # This will only remove masks created by d-s-h on package removal. deb-systemd-helper unmask 'wb-cloud-agent-frpc.service' >/dev/null || true if deb-systemd-helper --quiet was-enabled 'wb-cloud-agent-frpc.service'; then # Create new symlinks, if any. deb-systemd-helper enable 'wb-cloud-agent-frpc.service' >/dev/null || true fi fi # Update the statefile to add new symlinks (if any), which need to be cleaned # up on purge. Also remove old symlinks. deb-systemd-helper update-state 'wb-cloud-agent-frpc.service' >/dev/null || true fi # End automatically added section