mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-28 18:29:05 +01:00
Use sh to execute cyberpanel.sh to avoid permission issues
- Execute with 'sh' instead of relying on exec permissions - More reliable in process substitution context - Handles cases where chmod might not work properly
This commit is contained in:
10
install.sh
10
install.sh
@@ -111,9 +111,10 @@ if [ "$BRANCH_NAME" = "v2.5.5-dev" ] || [ "$BRANCH_NAME" = "stable" ]; then
|
||||
# Try to download from the branch-specific URL
|
||||
if curl --silent -o "$SCRIPT_PATH" "https://raw.githubusercontent.com/master3395/cyberpanel/$BRANCH_NAME/cyberpanel.sh" 2>/dev/null; then
|
||||
if [ -f "$SCRIPT_PATH" ] && [ -s "$SCRIPT_PATH" ]; then
|
||||
chmod +x "$SCRIPT_PATH"
|
||||
chmod +x "$SCRIPT_PATH" 2>/dev/null || true
|
||||
echo "✅ Downloaded cyberpanel.sh from branch $BRANCH_NAME"
|
||||
exec "$SCRIPT_PATH" "$@"
|
||||
# Use sh to execute to avoid permission issues
|
||||
exec sh "$SCRIPT_PATH" "$@"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -122,9 +123,10 @@ fi
|
||||
if curl --silent -o "$SCRIPT_PATH" "https://cyberpanel.sh/?dl&$SERVER_OS" 2>/dev/null || \
|
||||
wget -q -O "$SCRIPT_PATH" "https://cyberpanel.sh/?dl&$SERVER_OS" 2>/dev/null; then
|
||||
if [ -f "$SCRIPT_PATH" ] && [ -s "$SCRIPT_PATH" ]; then
|
||||
chmod +x "$SCRIPT_PATH"
|
||||
chmod +x "$SCRIPT_PATH" 2>/dev/null || true
|
||||
echo "✅ Downloaded cyberpanel.sh from standard source"
|
||||
exec "$SCRIPT_PATH" "$@"
|
||||
# Use sh to execute to avoid permission issues
|
||||
exec sh "$SCRIPT_PATH" "$@"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user