diff --git a/x-ui.rc b/x-ui.rc index cfb54211..55f6246b 100644 --- a/x-ui.rc +++ b/x-ui.rc @@ -13,6 +13,6 @@ start_pre(){ } reload() { ebegin "Reloading ${RC_SVCNAME}" - kill -USR1 $pidfile + kill -USR1 $(cat $pidfile) eend $? } \ No newline at end of file diff --git a/x-ui.sh b/x-ui.sh index abba9226..020c686f 100644 --- a/x-ui.sh +++ b/x-ui.sh @@ -436,7 +436,11 @@ restart() { } restart_xray() { - systemctl reload x-ui + if [[ $release == "alpine" ]]; then + rc-service x-ui reload + else + systemctl reload x-ui + fi LOGI "xray-core Restart signal sent successfully, Please check the log information to confirm whether xray restarted successfully" sleep 2 show_xray_status