HotFix: Restart service to clear API traffic
This commit is contained in:
@ -15,7 +15,7 @@ remove_user() {
|
|||||||
if [ -f "$USERS_FILE" ]; then
|
if [ -f "$USERS_FILE" ]; then
|
||||||
if jq -e "has(\"$username\")" "$USERS_FILE" > /dev/null; then
|
if jq -e "has(\"$username\")" "$USERS_FILE" > /dev/null; then
|
||||||
jq --arg username "$username" 'del(.[$username])' "$USERS_FILE" > "${USERS_FILE}.temp" && mv "${USERS_FILE}.temp" "$USERS_FILE"
|
jq --arg username "$username" 'del(.[$username])' "$USERS_FILE" > "${USERS_FILE}.temp" && mv "${USERS_FILE}.temp" "$USERS_FILE"
|
||||||
|
python3 $CLI_PATH restart-hysteria2
|
||||||
echo "User $username removed successfully."
|
echo "User $username removed successfully."
|
||||||
else
|
else
|
||||||
echo -e "${red}Error:${NC} User $username not found."
|
echo -e "${red}Error:${NC} User $username not found."
|
||||||
|
|||||||
Reference in New Issue
Block a user