mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-30 05:05:13 +08:00
🌴 Sync 2026-06-17 21:17:50
This commit is contained in:
1 parent
613096ac36
commit
bd9e30ea67
36 files changed
+3856
-3564
No files matched your search
@@ -223,7 +223,14 @@ run_installer() {
|
||||
[ -d "$dir" ] || { json_error "Unknown upload id"; return; }
|
||||
name="$(cat "$dir/name" 2>/dev/null)"
|
||||
file="$dir/$name"
|
||||
[ -x "$file" ] || { json_error "Uploaded file is not executable"; return; }
|
||||
|
||||
# 确保文件可执行(.run 和 .sh 都需要)
|
||||
chmod 700 "$file" 2>/dev/null || true
|
||||
|
||||
[ -x "$file" ] || {
|
||||
json_error "Uploaded file is not executable. Please check file permissions."
|
||||
return
|
||||
}
|
||||
|
||||
read_state
|
||||
if is_running "$PID"; then
|
||||
|
||||
@@ -72,8 +72,13 @@ saved_token="$(cat "$dir/token" 2>/dev/null)"
|
||||
|
||||
name="$(cat "$dir/name" 2>/dev/null)"
|
||||
case "$name" in
|
||||
*.run) ;;
|
||||
*) fail "Invalid filename" ;;
|
||||
*.run)
|
||||
;;
|
||||
*.sh)
|
||||
;;
|
||||
*)
|
||||
fail "Invalid filename"
|
||||
;;
|
||||
esac
|
||||
|
||||
length="${CONTENT_LENGTH:-0}"
|
||||
|
||||
Reference in new issue
Block a user