fix: fix method to remove all env and log files
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -409,8 +409,8 @@ function remove_klipper_systemd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function remove_klipper_env_file() {
|
function remove_klipper_env_file() {
|
||||||
local files regex="klipper.env"
|
local files name="klipper.env"
|
||||||
files=$(find "${PRINTER_DATA}" -maxdepth 2 -regextype posix-extended -regex "${PRINTER_DATA}/.*/${regex}" 2> /dev/null | sort)
|
files=$(find "${PRINTER_DATA}" -name "${name}" 2> /dev/null | sort)
|
||||||
|
|
||||||
if [[ -n ${files} ]]; then
|
if [[ -n ${files} ]]; then
|
||||||
for file in ${files}; do
|
for file in ${files}; do
|
||||||
@@ -422,8 +422,8 @@ function remove_klipper_env_file() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function remove_klipper_logs() {
|
function remove_klipper_logs() {
|
||||||
local files regex="klippy.log(.*)?"
|
local files name="klippy.log*"
|
||||||
files=$(find "${PRINTER_DATA}" -maxdepth 2 -regextype posix-extended -regex "${PRINTER_DATA}/.*/${regex}" 2> /dev/null | sort)
|
files=$(find "${PRINTER_DATA}" -name "${name}" 2> /dev/null | sort)
|
||||||
|
|
||||||
if [[ -n ${files} ]]; then
|
if [[ -n ${files} ]]; then
|
||||||
for file in ${files}; do
|
for file in ${files}; do
|
||||||
|
|||||||
@@ -465,8 +465,8 @@ function remove_moonraker_systemd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function remove_moonraker_env_file() {
|
function remove_moonraker_env_file() {
|
||||||
local files regex="moonraker.env"
|
local files name="moonraker.env"
|
||||||
files=$(find "${PRINTER_DATA}" -maxdepth 2 -regextype posix-extended -regex "${PRINTER_DATA}/.*/${regex}" 2> /dev/null | sort)
|
files=$(find "${PRINTER_DATA}" -name "${name}" 2> /dev/null | sort)
|
||||||
|
|
||||||
if [[ -n ${files} ]]; then
|
if [[ -n ${files} ]]; then
|
||||||
for file in ${files}; do
|
for file in ${files}; do
|
||||||
@@ -478,8 +478,8 @@ function remove_moonraker_env_file() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function remove_moonraker_logs() {
|
function remove_moonraker_logs() {
|
||||||
local files regex="moonraker.log(.*)?"
|
local files name="moonraker.log*"
|
||||||
files=$(find "${PRINTER_DATA}" -maxdepth 2 -regextype posix-extended -regex "${PRINTER_DATA}/.*/${regex}" 2> /dev/null | sort)
|
files=$(find "${PRINTER_DATA}" -name "${name}" 2> /dev/null | sort)
|
||||||
|
|
||||||
if [[ -n ${files} ]]; then
|
if [[ -n ${files} ]]; then
|
||||||
for file in ${files}; do
|
for file in ${files}; do
|
||||||
|
|||||||
Reference in New Issue
Block a user