fix: always use system home directory (#303)

This commit is contained in:
Pedro Lamas
2023-02-28 14:30:42 +00:00
committed by GitHub
parent fd27db28d4
commit e3ed223b5c
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