2025-08-01 14:56:30 +05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
2025-09-23 21:50:37 +02:00
|
|
|
# Check for branch parameter
|
|
|
|
|
BRANCH_NAME=""
|
2026-02-15 00:34:49 +01:00
|
|
|
EXTRA_ARGS=""
|
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
|
case "$1" in
|
|
|
|
|
-b|--branch)
|
|
|
|
|
BRANCH_NAME="$2"
|
|
|
|
|
shift 2
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
EXTRA_ARGS="$EXTRA_ARGS $1"
|
|
|
|
|
shift
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
done
|
2025-09-23 21:50:37 +02:00
|
|
|
|
|
|
|
|
# If no branch specified, get stable version
|
|
|
|
|
if [ -z "$BRANCH_NAME" ]; then
|
|
|
|
|
BRANCH_NAME=v$(curl -s https://cyberpanel.net/version.txt | sed -e 's|{"version":"||g' -e 's|","build":|.|g'| sed 's:}*$::')
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Upgrading CyberPanel from branch: $BRANCH_NAME"
|
2025-08-01 14:56:30 +05:00
|
|
|
|
|
|
|
|
rm -f /usr/local/cyberpanel_upgrade.sh
|
2026-01-28 03:13:14 +01:00
|
|
|
wget -O /usr/local/cyberpanel_upgrade.sh https://raw.githubusercontent.com/master3395/cyberpanel/$BRANCH_NAME/cyberpanel_upgrade.sh 2>/dev/null
|
2025-08-01 14:56:30 +05:00
|
|
|
chmod 700 /usr/local/cyberpanel_upgrade.sh
|
2026-02-15 00:34:49 +01:00
|
|
|
# Pass -b so upgrade script skips branch prompt and uses our branch
|
|
|
|
|
/usr/local/cyberpanel_upgrade.sh -b "$BRANCH_NAME" $EXTRA_ARGS
|