diff options
author | Himbeer <himbeer@disroot.org> | 2024-08-28 23:43:41 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-08-28 23:43:41 +0200 |
commit | 3848ac7b8566a3b9eff80cf85c433e3316d7109a (patch) | |
tree | c07f35b356ba45b594882b3edcb4d4b8503a31ad | |
parent | b68669fb6629bcc4a1f34e032190133c5563b56d (diff) |
Automatically create and remove configuration file parent directories
-rwxr-xr-x | install.sh | 4 | ||||
-rw-r--r-- | lib.sh | 1 | ||||
-rwxr-xr-x | uninstall.sh | 4 |
3 files changed, 9 insertions, 0 deletions
@@ -2,6 +2,10 @@ source /srv/www/lib.sh +for DIR in ${DIRS}; do + mkdir -p "${DIR}" +done + for FILE in ${FILES}; do ln -sf "/srv/www/sys/${FILE}" "/${FILE}" done @@ -1,3 +1,4 @@ #! /bin/sh +DIRS="etc/caddy etc/searxng usr/local/searxng" FILES="etc/cgitrc etc/caddy/Caddyfile etc/searxng/settings.yml usr/local/searxng/searxng.sh usr/local/searxng/searxng_debug.sh" diff --git a/uninstall.sh b/uninstall.sh index 9ff5f45..82fa95d 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -5,3 +5,7 @@ source /srv/www/lib.sh for FILE in ${FILES}; do rm "/${FILE}" done + +for DIR in ${DIRS}; do + rm -r "${DIR}" +done |