[hamradio-commits] [dump1090-mutability] 118/172: Directly include the VRS-derived json db since the underlying DB is not being updated any more.

Matteo F. Vescovi mfv at moszumanska.debian.org
Sun Jan 28 13:45:51 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 2dc10356132ae4b328090c961ba5bd95b2ec0733
Author: Oliver Jowett <oliver at mutability.co.uk>
Date:   Tue Feb 16 10:33:18 2016 +0000

    Directly include the VRS-derived json db since the underlying DB
    is not being updated any more.
---
 debian/dump1090-mutability.install  |  3 ---
 debian/dump1090-mutability.postinst | 23 ++++-------------------
 debian/lighttpd/89-dump1090.conf    |  1 -
 debian/nginx/dump1090-mutability    |  3 ---
 4 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/debian/dump1090-mutability.install b/debian/dump1090-mutability.install
index fffdec9..68ec6b1 100644
--- a/debian/dump1090-mutability.install
+++ b/debian/dump1090-mutability.install
@@ -2,6 +2,3 @@ public_html/* usr/share/dump1090-mutability/html
 debian/lighttpd/* etc/lighttpd/conf-available
 debian/nginx/* etc/nginx/sites-available
 debian/config-template usr/share/dump1090-mutability
-debian/cron-template usr/share/dump1090-mutability
-tools/vrs-basicaircraft-to-json.py usr/share/dump1090-mutability
-tools/update-aircraft-database.sh usr/share/dump1090-mutability
diff --git a/debian/dump1090-mutability.postinst b/debian/dump1090-mutability.postinst
index b548d42..561613e 100644
--- a/debian/dump1090-mutability.postinst
+++ b/debian/dump1090-mutability.postinst
@@ -120,26 +120,11 @@ case "$1" in
         touch $RET
         chown $RUNAS $RET
 
-        # create cronjob
-        if ! test -e $CRONFILE; then
-            echo "Creating cronjob in $CRONFILE to periodically update the aircraft database.." >&2
-            MIN=$(($RANDOM % 60))
-            tail -n +4 $TEMPLATECRON | sed -e "s/@USER@/$RUNAS/g" -e "s/@MIN@/$MIN/g" >$CRONFILE
-        fi
-
-        # update the DB
-        echo "Updating aircraft database now.."
-        mkdir -m 0755 -p /var/cache/$NAME
-        chown $RUNAS /var/cache/$NAME
-        su $RUNAS -s /bin/bash -c /usr/share/$NAME/update-aircraft-database.sh || \
-          echo "Aircraft database update failed. It will be retried periodically from cron." >&2
-
-        # config file changed between 1.14 and 1.15
+        # this config file has changed a few times, restart lighttpd to make sure we
+        # have the latest version
         if [ -e /etc/lighttpd/conf-enabled/89-dump1090.conf ]; then
-            if dpkg --compare-versions "$2" le "1.14"; then
-                echo "Restarting lighttpd.." >&2
-                invoke-rc.d lighttpd restart || echo "Warning: lighttpd failed to restart." >&2
-            fi
+            echo "Restarting lighttpd.." >&2
+            invoke-rc.d lighttpd restart || echo "Warning: lighttpd failed to restart." >&2
         fi
     ;;
 
diff --git a/debian/lighttpd/89-dump1090.conf b/debian/lighttpd/89-dump1090.conf
index 5eb563d..17b6251 100644
--- a/debian/lighttpd/89-dump1090.conf
+++ b/debian/lighttpd/89-dump1090.conf
@@ -9,7 +9,6 @@ url.redirect += (
 
 alias.url += (
   "/dump1090/data/" => "/run/dump1090-mutability/",
-  "/dump1090/db/" => "/var/cache/dump1090-mutability/db/",
   "/dump1090/" => "/usr/share/dump1090-mutability/html/"
 )
 
diff --git a/debian/nginx/dump1090-mutability b/debian/nginx/dump1090-mutability
index c7e63c3..6ab9290 100644
--- a/debian/nginx/dump1090-mutability
+++ b/debian/nginx/dump1090-mutability
@@ -12,8 +12,5 @@ server{
         location /dump1090/data/ {
            alias /run/dump1090-mutability/;
         }
-        location /dump1090/db/ {
-           alias /var/cache/dump1090-mutability/db/;
-        }
 }
 

-- 
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