diff --git a/upgrade.sh b/upgrade.sh index 3cc21a2..f82d90f 100644 --- a/upgrade.sh +++ b/upgrade.sh @@ -38,15 +38,20 @@ chown hysteria:hysteria /etc/hysteria/ca.key /etc/hysteria/ca.crt chmod 640 /etc/hysteria/ca.key /etc/hysteria/ca.crt chown -R hysteria:hysteria /etc/hysteria/core/scripts/singbox +echo "Setting execute permissions for user.sh and kick.sh" +chmod +x /etc/hysteria/core/scripts/hysteria2/user.sh +chmod +x /etc/hysteria/core/scripts/hysteria2/kick.sh + +cd /etc/hysteria +python3 -m venv hysteria2_venv +source /etc/hysteria/hysteria2_venv/bin/activate +pip install -r requirements.txt + echo "Restarting hysteria services" systemctl restart hysteria-server.service systemctl restart hysteria-bot.service systemctl restart singbox.service -echo "Setting execute permissions for user.sh and kick.sh" -chmod +x /etc/hysteria/core/scripts/hysteria2/user.sh -chmod +x /etc/hysteria/core/scripts/hysteria2/kick.sh - echo "Checking hysteria-server.service status" if systemctl is-active --quiet hysteria-server.service; then echo "Upgrade completed successfully" @@ -54,10 +59,5 @@ else echo "Upgrade failed: hysteria-server.service is not active" fi -cd /etc/hysteria -python3 -m venv hysteria2_venv -source /etc/hysteria/hysteria2_venv/bin/activate -pip install -r requirements.txt - chmod +x menu.sh ./menu.sh