mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 02:54:28 +05:00
fix: always use system home directory (#303)
This commit is contained in:
@@ -465,7 +465,7 @@ function remove_moonraker_systemd() {
|
||||
}
|
||||
|
||||
function remove_moonraker_env_file() {
|
||||
local files regex="\/home\/${USER}\/([A-Za-z0-9_]+)\/systemd\/moonraker\.env"
|
||||
local files regex="${HOME//\//\\/}\/([A-Za-z0-9_]+)\/systemd\/moonraker\.env"
|
||||
files=$(find "${HOME}" -maxdepth 3 -regextype posix-extended -regex "${regex}" | sort)
|
||||
|
||||
if [[ -n ${files} ]]; then
|
||||
@@ -478,7 +478,7 @@ function remove_moonraker_env_file() {
|
||||
}
|
||||
|
||||
function remove_moonraker_logs() {
|
||||
local files regex="\/home\/${USER}\/([A-Za-z0-9_]+)\/logs\/moonraker\.log.*"
|
||||
local files regex="${HOME//\//\\/}\/([A-Za-z0-9_]+)\/logs\/moonraker\.log.*"
|
||||
files=$(find "${HOME}" -maxdepth 3 -regextype posix-extended -regex "${regex}" | sort)
|
||||
|
||||
if [[ -n ${files} ]]; then
|
||||
|
||||
Reference in New Issue
Block a user