Download the Script
bash
wget -O $HOME/auto-upgrade.sh https://files.mictonode.com/scripts/auto-upgrade.sh
chmod +x $HOME/auto-upgrade.sh(Optional) Telegram Notification
Create the config file:
bash
nano $HOME/tg.confPaste your bot details:
bash
CHAT_ID_ALARM="123456789"
BOT_TOKEN="123456789:ABCdefGhIJKlMNopQRsTUvWXyz"Test:
bash
source $HOME/tg.conf
curl -s -X POST "https://api.telegram.org/bot$BOT_TOKEN/sendMessage" \
-d chat_id="$CHAT_ID_ALARM" -d text="â
Telegram is working!"Start the Upgrade Monitor
Choose one of the following based on what you want to upgrade:
Warning: Warning
This setup was prepared following the guide below.
The height, STORY_PORT, and version values (e.g., story-version, geth-version) used in the commands are examples.
You can modify them as needed and reuse the commands at any time.
đĻ Only story binary
bash
STORY_PORT="62"
SCRIPT="$HOME/auto-upgrade.sh"
PROJECT="$HOME/.story"
tmux new -s story-upgrade "bash $SCRIPT --binary story --height 6008000 --story-version v1.3.0 --project-home $PROJECT --rpc-port ${STORY_PORT}657"đŠ Only story-geth binary
bash
STORY_PORT="62"
SCRIPT="$HOME/auto-upgrade.sh"
PROJECT="$HOME/.story"
tmux new -s story-upgrade "bash $SCRIPT --binary story-geth --height 6008000 --geth-version v1.1.0 --project-home $PROJECT --rpc-port ${STORY_PORT}657"đ¨ Both story and story-geth
bash
STORY_PORT="62"
SCRIPT="$HOME/auto-upgrade.sh"
PROJECT="$HOME/.story"
tmux new -s story-upgrade "bash $SCRIPT --binary both --height 6008000 --story-version v1.3.0 --geth-version v1.1.0 --project-home $PROJECT --rpc-port ${STORY_PORT}657"âšī¸ How It Works
- GitHub repos (
story/story-geth) are cloned into a temp folder - Specified versions are checked out
- Binaries are built into
$HOME/tmp-upgrade/bin/ - When the upgrade block is reached:
- Binaries are moved into
$HOME/go/bin/ - Services (
story,story-geth) are restarted - Telegram notification is sent (if configured)
- Binaries are moved into
đ§ Tips
- Detach from
tmux:CTRL+BthenD - Reattach:
tmux attach -t story-upgrade - Script auto-exits 15 minutes after upgrade