fix: always use system home directory

Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
This commit is contained in:
Pedro Lamas
2023-02-28 13:37:22 +00:00
parent fd27db28d4
commit 6249ab10a6
8 changed files with 18 additions and 18 deletions

View File

@@ -79,7 +79,7 @@ function symlink_webui_nginx_log() {
interface=${1}
access_log="/var/log/nginx/${interface}-access.log"
error_log="/var/log/nginx/${interface}-error.log"
regex="\/home\/${USER}\/([A-Za-z0-9_]+)\/logs"
regex="${HOME//\//\\/}\/([A-Za-z0-9_]+)\/logs"
logpaths=$(find "${HOME}" -maxdepth 2 -type d -regextype posix-extended -regex "${regex}" | sort)
for path in ${logpaths}; do