Using clear_map_cache.sh script to handle clearing cache and restarting renderd after map import.

This commit is contained in:
Roland 2023-08-16 14:22:08 -06:00
parent a66fdb6b35
commit 1e0e72fa24
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
5 changed files with 20 additions and 9 deletions

13
scripts/clear_map_cache.sh Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Simple script which removes the Renderd map tile cache files.
# Re-execute this script if it wasn't called with sudo.
if [ $EUID != 0 ]; then
sudo "$0" "$@"
exit $?
fi
[ -d /var/lib/mod_tile/ajt ] && rm -rf /var/lib/mod_tile/ajt
[ -d /var/cache/renderd/tiles/ajt ] && rm -rf /var/cache/renderd/tiles/ajt
systemctl restart renderd