From 7afe429bc96fffedcb3f25458fac65cbe26e5a5c Mon Sep 17 00:00:00 2001 From: Sarina Date: Sun, 21 Jul 2024 18:24:16 +0330 Subject: [PATCH] Modify restart-hysteria2 --- core/cli.py | 5 ----- core/scripts/hysteria2/restart.sh | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) 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