Skip to content

Commit

Permalink
Fix preinst hook (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
sikmir authored Jun 28, 2024
1 parent ebeb08e commit 8ea2694
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
wb-cloud-agent (1.5.5) stable; urgency=medium

* Fix preinst hook

-- Nikolay Korotkiy <[email protected]> Fri, 28 Jun 2024 11:00:00 +0400

wb-cloud-agent (1.5.4) stable; urgency=medium

* fix cloud connection status absense in UI if no providers configured
Expand Down
9 changes: 5 additions & 4 deletions debian/wb-cloud-agent.preinst
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ set -e

CONFFILE=/etc/wb-cloud-agent.conf

if [ -L "$CONFFILE" ] && [ ! -e "$CONFFILE" ]; then
echo "Removing broken symlink: $CONFFILE"
rm "$CONFFILE"
fi

if [ "$1" = "upgrade" ]; then
if dpkg --compare-versions "$2" lt "1.2.4~~" && dpkg --compare-versions "$2" gt "1.2.2~~"; then
# make old broken postrm script happy
rm -f /etc/nginx/sites-enabled/wb-cloud-agent
deb-systemd-invoke restart nginx.service || true
fi

if [ -L "$CONFFILE" ] && [ ! -e "$CONFFILE" ]; then
echo "Removing broken symlink: $CONFFILE"
rm "$CONFFILE"
fi
fi

#DEBHELPER#

0 comments on commit 8ea2694

Please sign in to comment.