diff --git a/core/cli.py b/core/cli.py index 82f98ba..46dc3f4 100644 --- a/core/cli.py +++ b/core/cli.py @@ -71,11 +71,6 @@ def update_hysteria2(): @cli.command('restart-hysteria2') def restart_hysteria2(): - # save traffic status before restarting hysteria2 - # ignore the traffic_status prints - f = io.StringIO() - with redirect_stdout(f): - traffic.traffic_status() run_cmd(['bash', Command.RESTART_HYSTERIA2]) diff --git a/core/scripts/hysteria2/restart.sh b/core/scripts/hysteria2/restart.sh index 315a734..fa4be6c 100644 --- a/core/scripts/hysteria2/restart.sh +++ b/core/scripts/hysteria2/restart.sh @@ -1 +1,4 @@ +#!/bin/bash + +python3 /etc/hysteria/core/cli.py traffic-status > /dev/null 2>&1 systemctl restart hysteria-server.service \ No newline at end of file