Use bash instead of sh to execute cyberpanel.sh

- cyberpanel.sh uses #!/bin/bash so should be executed with bash
- Change to /tmp directory before execution to ensure writable location
- Fixes permission issues when cyberpanel.sh tries to execute other scripts
This commit is contained in:
master3395
2026-01-26 21:17:34 +01:00
parent 4b99e46bfd
commit 5ee18f1cc3

View File

@@ -113,8 +113,10 @@ if [ "$BRANCH_NAME" = "v2.5.5-dev" ] || [ "$BRANCH_NAME" = "stable" ]; then
if [ -f "$SCRIPT_PATH" ] && [ -s "$SCRIPT_PATH" ]; then
chmod +x "$SCRIPT_PATH" 2>/dev/null || true
echo "✅ Downloaded cyberpanel.sh from branch $BRANCH_NAME"
# Use sh to execute to avoid permission issues
exec sh "$SCRIPT_PATH" "$@"
# Use bash to execute (cyberpanel.sh uses #!/bin/bash)
# Change to /tmp to ensure we're in a writable directory
cd /tmp
exec bash "$SCRIPT_PATH" "$@"
fi
fi
fi
@@ -125,8 +127,10 @@ if curl --silent -o "$SCRIPT_PATH" "https://cyberpanel.sh/?dl&$SERVER_OS" 2>/dev
if [ -f "$SCRIPT_PATH" ] && [ -s "$SCRIPT_PATH" ]; then
chmod +x "$SCRIPT_PATH" 2>/dev/null || true
echo "✅ Downloaded cyberpanel.sh from standard source"
# Use sh to execute to avoid permission issues
exec sh "$SCRIPT_PATH" "$@"
# Use bash to execute (cyberpanel.sh uses #!/bin/bash)
# Change to /tmp to ensure we're in a writable directory
cd /tmp
exec bash "$SCRIPT_PATH" "$@"
fi
fi