[hamradio-commits] [dump1090-mutability] 70/172: Restart lighttpd on package upgrade if we changed its config files.

Matteo F. Vescovi mfv at moszumanska.debian.org
Sun Jan 28 13:45:47 UTC 2018


This is an automated email from the git hooks/post-receive script.

mfv pushed a commit to branch master
in repository dump1090-mutability.

commit 7a2d5421221dfe92714c78362726a568f593429e
Author: Oliver Jowett <oliver at mutability.co.uk>
Date:   Wed Jan 14 00:34:06 2015 +0000

    Restart lighttpd on package upgrade if we changed its config files.
---
 debian/changelog                    |  1 +
 debian/dump1090-mutability.postinst | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index bd5dd00..fa617c0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ dump1090-mutability (1.10.3010.14mu-11) UNRELEASED; urgency=medium
   * Add --max-range parameter. Use it for relative position limits, and to
     discard bad position results.
   * Display message rate (30 sec average) on the webmap.
+  * Restart lighttpd on package upgrade if we changed its config files.
 
  -- Oliver Jowett <oliver at mutability.co.uk>  Sun, 11 Jan 2015 11:53:48 +0000
 
diff --git a/debian/dump1090-mutability.postinst b/debian/dump1090-mutability.postinst
index bb57a7a..d33d600 100644
--- a/debian/dump1090-mutability.postinst
+++ b/debian/dump1090-mutability.postinst
@@ -99,6 +99,16 @@ case "$1" in
           db_get $NAME/run-as-user
           adduser --system --home /usr/share/$NAME --no-create-home --quiet "$RET"
         fi
+
+        # -10 changed the lighttpd config file, but didn't arrange to restart it.
+        # If we are upgrading from -10 or earlier, and lighttpd is in use,
+        # restart it.
+        if [ -e /etc/lighttpd/conf-enabled/89-dump1090.conf ]; then
+            if dpkg --compare-versions "$2" le "1.10.3010.14mu-10"; then
+                echo "Restarting lighttpd.." >&2
+                service lighttpd restart || echo "Warning: lighttpd failed to restart." >&2
+            fi
+        fi
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090-mutability.git



More information about the pkg-hamradio-commits mailing list