mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 01:16:18 -05:00
Combining install scripts into a new repair script. Removing create_db script in favor of repair script.
This commit is contained in:
parent
b817534c37
commit
6e0f9a999c
57 changed files with 785 additions and 724 deletions
20
scripts/clear_map_cache.sh
Executable file
20
scripts/clear_map_cache.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source /opt/wrolpi/wrolpi/scripts/lib.sh
|
||||
|
||||
# Re-execute this script if it wasn't called with sudo.
|
||||
if [ $EUID != 0 ]; then
|
||||
sudo "$0" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
yes_or_no "Are you sure you want to delete map cache files?" || exit 0
|
||||
|
||||
set -x
|
||||
|
||||
# Clear map tile cache only after successful import.
|
||||
[ -d /var/lib/mod_tile/ajt ] && rm -rf /var/lib/mod_tile/ajt && chown -R _renderd:_renderd /var/lib/mod_tile
|
||||
[ -d /var/cache/renderd/tiles/ajt ] && rm -rf /var/cache/renderd/tiles/ajt && chown -R _renderd:_renderd /var/cache/renderd
|
||||
|
||||
# Restart renderd to forget the cache.
|
||||
systemctl restart renderd
|
||||
Loading…
Add table
Add a link
Reference in a new issue