summaryrefslogtreecommitdiffhomepage
path: root/contrib/package/freifunk-mapupdate
diff options
context:
space:
mode:
authorSven Roederer <freifunk@it-solutions.geroedel.de>2019-02-03 14:13:35 +0100
committerSven Roederer <freifunk@it-solutions.geroedel.de>2019-02-13 21:23:34 +0100
commit4654ba92c3999d84b08211f05d2ccb5ea9da731b (patch)
tree06cedf8e8badc0ce584d8bd5e97fab7476c81549 /contrib/package/freifunk-mapupdate
parenteda8f02dac3caa4d0f52cd1e860d7a392c295df3 (diff)
treewide: move freifunk-related packages to separate repo
Even Freifunk was one of the major factory to create the LuCI-system, it's now only a very small part of LuCI. LuCI has become a much bigger thing and it seems that it's time to move the packages only relating to Freifunk into it's own feed. On the mailinglist it was discussed [1] and a repo below the general Freifunk team on github was created. This commit removes all packages that will be hosted in the new repo [2] 1 - http://lists.freifunk.net/pipermail/wlannews-freifunk.net/2019-February/004818.html 2 - https://github.com/freifunk/openwrt-packages Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
Diffstat (limited to 'contrib/package/freifunk-mapupdate')
-rw-r--r--contrib/package/freifunk-mapupdate/Makefile39
-rw-r--r--contrib/package/freifunk-mapupdate/files/etc/config/freifunk-mapupdate3
-rwxr-xr-xcontrib/package/freifunk-mapupdate/files/usr/sbin/ff_mapupdate.sh59
-rw-r--r--contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate6
4 files changed, 0 insertions, 107 deletions
diff --git a/contrib/package/freifunk-mapupdate/Makefile b/contrib/package/freifunk-mapupdate/Makefile
deleted file mode 100644
index a9281ca20a..0000000000
--- a/contrib/package/freifunk-mapupdate/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (C) 2011 Manuel Munz <freifunk at somakoma de>
-# This is free software, licensed under the Apache 2.0 license.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=freifunk-mapupdate
-PKG_RELEASE:=1
-
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/freifunk-mapupdate
- SECTION:=luci
- CATEGORY:=LuCI
- SUBMENU:=9. Freifunk
- TITLE:=Update script for freifunkmap
- DEPENDS:=+olsrd-mod-nameservice
-endef
-
-define Package/freifunk-mapupdate/description
- This script updates the freifunkmap (also known as the global map, see http://map.berlin.freifunk.net) every hour. Config file is /etc/config/freifunk-mapupdate.
-endef
-
-define Build/Prepare
- mkdir -p $(PKG_BUILD_DIR)
-endef
-
-define Build/Configure
-endef
-
-define Build/Compile
-endef
-
-define Package/freifunk-mapupdate/install
- $(CP) ./files/* $(1)/
-endef
-
-$(eval $(call BuildPackage,freifunk-mapupdate))
diff --git a/contrib/package/freifunk-mapupdate/files/etc/config/freifunk-mapupdate b/contrib/package/freifunk-mapupdate/files/etc/config/freifunk-mapupdate
deleted file mode 100644
index 7e98f956d5..0000000000
--- a/contrib/package/freifunk-mapupdate/files/etc/config/freifunk-mapupdate
+++ /dev/null
@@ -1,3 +0,0 @@
-config 'mapupdate' 'mapupdate'
- option 'enabled' '1'
- option 'mapserver' 'http://map.berlin.freifunk.net/freifunkmap.php'
diff --git a/contrib/package/freifunk-mapupdate/files/usr/sbin/ff_mapupdate.sh b/contrib/package/freifunk-mapupdate/files/usr/sbin/ff_mapupdate.sh
deleted file mode 100755
index b06e145d65..0000000000
--- a/contrib/package/freifunk-mapupdate/files/usr/sbin/ff_mapupdate.sh
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-
-if [ ! "$(uci -q get freifunk-mapupdate.mapupdate.enabled)" == 1 ]; then
- exit 1
-fi
-
-MAPSERVER="$(uci -q get freifunk-mapupdate.mapupdate.mapserver)"
-[ -z "$MAPSERVER" ] && logger -t "freifunk-mapupdate:" "No mapserver configured" && exit 1
-
-#check if nameservice plugin is installed and enabled, else exit
-nslib=`uci show olsrd |grep olsrd_nameservice |awk {' FS="."; print $1"."$2 '}`
-if [ -n "$nslib" ]; then
- LATLONFILE="$(uci -q get $nslib.latlon_file)"
- if [ -z "$LATLONFILE" ]; then
- LATLONFILE="/var/run/latlon.js"
- fi
- if [ ! -p "$LATLONFILE" ]; then
- logger -t "freifunk-mapupdate:" "latlon_file not found."; exit 1
- fi
-else
- logger -t "freifunk-mapupdate:" "nameservice plugin not found in olsrd config."
- exit 1
-fi
-
-HOSTNAME="$(uci show system |grep hostname |cut -d "=" -f 2)"
-HF_INFO=""
-
-# Get info for myself
-SELF=$(cat $LATLONFILE |grep ^Self | sed -e 's/Self(//' -e 's/);//' -e "s/'//g")
-OLSR_IP="$(echo $SELF |awk '{ FS=",";print $1 }')"
-LOCATION="$(uci show system |grep .location |cut -d "=" -f 2)"
-[ -n "$LOCATION" ] && NOTE="$LOCATION<br>"
-FFNOTE="$(uci -q get freifunk.contact.note)"
-[ -n "$FFNOTE" ] && NOTE="$NOTE $FFNOTE"
-NOTE="<h3><a href='http://$OLSR_IP' target='_blank'>$HOSTNAME</a></h3><p>$NOTE"
-NOTE=`echo -e "$NOTE" | sed -e 's/\ /%20/g' -e 's/&/%26/g' -e 's/"/%22/g'`
-
-UPDATESTRING="$(echo $SELF |awk '{ FS=",";print $2 }'), $(echo $SELF |awk '{ FS=",";print $3 }')"
-
-# write our coordinates to mygooglemapscoords.txt to make Freifunk Firmware happy
-echo "$UPDATESTRING" > /tmp/mygooglemapscoords.txt
-[ ! -L /www/mygooglemapscoords.txt ] && ln -s /tmp/mygooglemapscoords.txt /www/mygooglemapscoords.txt
-
-# get neighbor Info (lat, lon, lq)
-while read line; do
- NEIGHUPD="$(echo $line |awk '{ FS=","; print $6 }'), $(echo $line |awk '{ FS=","; print $7 }'), $(echo $line |awk '{ FS=",";print $4 }')"
- UPDATESTRING="${UPDATESTRING}, ${NEIGHUPD}"
-done << EOF
-`grep "PLink('$OLSR_IP" $LATLONFILE | sed -e 's/PLink(//' -e 's/);//' -e "s/'//g"`
-EOF
-
-# Send UPDATESTRING
-UPDATE=`echo -e "$UPDATESTRING" | sed s/\ /%20/g`
-result="$(wget "$MAPSERVER?update=$UPDATE&updateiv=3600&olsrip=$OLSR_IP&note=${NOTE}${HF_INFO}" -qO -)"
-
-if [ ! "$result" == "success update" ]; then
- logger -t "freifunk-mapupdate:" "Update failed: $result"
-fi
-
diff --git a/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate b/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate
deleted file mode 100644
index dee7f1bb58..0000000000
--- a/contrib/package/freifunk-mapupdate/root/etc/uci-defaults/50_freifunk-mapupdate
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-test -f /etc/crontabs/root || touch /etc/crontabs/root
-SEED="$( dd if=/dev/urandom bs=2 count=1 2>&- | hexdump | if read line; then echo 0x${line#* }; fi )"
-MIN="$(( $SEED % 59 ))"
-grep -q "ff_mapupdate.sh" /etc/crontabs/root || echo "$MIN * * * * /usr/sbin/ff_mapupdate.sh" >> /etc/crontabs/root
-/etc/init.d/cron restart