This commit is contained in:
YAWAsau
2021-11-03 22:31:00 +08:00
parent 9aa5cfec7c
commit e4722db208
7 changed files with 72 additions and 347 deletions

View File

@@ -46,7 +46,7 @@ Release_data() {
esac
;;
*)
[[ $FILE_NAME2 = thanox ]] && rm -rf "$(find "/data/system" -name "thanos_*" -maxdepth 1 -type d)"
[[ $FILE_NAME2 = thanox ]] && rm -rf "$(find "/data/system" -name "thanos*" -maxdepth 1 -type d)"
case ${FILE_NAME##*.} in
lz4) pv "$tar_path" | tar -I lz4 -xPpf - ;;
zst) pv "$tar_path" | tar -I zstd -xPpf - ;;
@@ -81,7 +81,7 @@ Release_data() {
elif [[ $FILE_NAME2 = data ]]; then
[[ -d $path/data/$name2 ]] && chown -R "1023:1078" "$path/data/$name2"
elif [[ $FILE_NAME2 = thanox ]]; then
restorecon -R "$(find "/data/system" -name "thanos_*" -maxdepth 1 -type d)" >/dev/null 2>&1
restorecon -R "$(find "/data/system" -name "thanos*" -maxdepth 1 -type d)" >/dev/null 2>&1
echo_log "selinux上下文設置" && echoRgb "警告 thanox配置恢復後務必重啟\n -否則不生效" "0"
fi
fi