monitoring/install.sh
Adrian Schmutzler dd6d101ccd Global: Identify local routers and indicate their status
This detects local routers based on knowing their hood, but not
having the hood listed in hoodsv2 table.

This classification is performed when the routers' alfred data
is parsed. Thus, offline routers won't change.

This requires changes to the MySQL database!

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-11-23 13:14:50 +01:00

25 lines
819 B
Bash
Executable File

#!/bin/bash
mkdir -vp /var/lib/ffmap/csv
#FIXME: create dummy csv files
chown -R www-data:www-data /var/lib/ffmap
mkdir -vp /usr/share/ffmap
cp -v ffmap/mapnik/{hoods,hoods_v2,routers,routers_v2,routers_local}.xml /usr/share/ffmap
sed -i -e 's#>csv/#>/var/lib/ffmap/csv/#' /usr/share/ffmap/{hoods,hoods_v2,routers,routers_v2,routers_local}.xml
chown www-data:www-data /usr/share/ffmap/{hoods,hoods_v2,routers,routers_v2,routers_local}.xml
cp -v ffmap/mapnik/tilestache.cfg /usr/share/ffmap
cp -rv ffmap/web/static /usr/share/ffmap
cp -rv ffmap/web/templates /usr/share/ffmap
mkdir -vp /var/cache/ffmap/tiles/
chown -R www-data:www-data /var/cache/ffmap/tiles/
cp -v ffmap/systemd/*.service /etc/systemd/system/
systemctl daemon-reload
python3 setup.py install --force
(cd ffmap/mapnik; python3 setup.py install)