mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update rebuild.sh
This commit is contained in:
parent
5032b33ac2
commit
0f34327259
@ -2,7 +2,6 @@
|
|||||||
DROPLET_IMAGE="ubuntu-24-04-x64"
|
DROPLET_IMAGE="ubuntu-24-04-x64"
|
||||||
SSH_KEY="~/.ssh/id_rsa"
|
SSH_KEY="~/.ssh/id_rsa"
|
||||||
PANEL_HOSTNAME="demo.openpanel.org"
|
PANEL_HOSTNAME="demo.openpanel.org"
|
||||||
DEMO_SCRIPT="https://raw.githubusercontent.com/stefanpejcic/OpenPanel/refs/heads/main/demo/2087/setup_demo.sh"
|
|
||||||
|
|
||||||
|
|
||||||
# Step 1: Rebuild the droplet
|
# Step 1: Rebuild the droplet
|
||||||
@ -26,14 +25,13 @@ sleep 300
|
|||||||
# Step 2: SSH to the droplet and run commands
|
# Step 2: SSH to the droplet and run commands
|
||||||
echo "Connecting to the droplet via SSH to set up the panel..."
|
echo "Connecting to the droplet via SSH to set up the panel..."
|
||||||
ssh -o StrictHostKeyChecking=no -i "$SSH_KEY" root@$DROPLET_IP <<EOF
|
ssh -o StrictHostKeyChecking=no -i "$SSH_KEY" root@$DROPLET_IP <<EOF
|
||||||
wget -O /root/demo.sh $DEMO_SCRIPT
|
wget -O /root/demo.sh https://raw.githubusercontent.com/stefanpejcic/OpenPanel/refs/heads/main/demo/2087/setup_demo.sh
|
||||||
bash <(curl -sSL https://openpanel.org) --hostname=$PANEL_HOSTNAME --post_install=/root/demo.sh
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [[ $? -ne 0 ]]; then
|
|
||||||
echo "Failed to connect or execute commands on the droplet."
|
ssh -o StrictHostKeyChecking=no -i "$SSH_KEY" root@$DROPLET_IP <<EOF
|
||||||
exit 1
|
bash <(curl -sSL https://openpanel.org) --hostname=demo.openpanel.org --post_install=/root/demo.sh
|
||||||
fi
|
EOF
|
||||||
|
|
||||||
|
|
||||||
# Step 3. create a snapshot
|
# Step 3. create a snapshot
|
||||||
|
Loading…
Reference in New Issue
Block a user