Added Web Panel service
This commit is contained in:
@ -89,19 +89,22 @@ load_hysteria2_ips() {
|
||||
}
|
||||
|
||||
check_services() {
|
||||
declare -A service_names=(
|
||||
["hysteria-server.service"]="Hysteria2"
|
||||
["normalsub.service"]="Normal Subscription"
|
||||
["singbox.service"]="Singbox Subscription"
|
||||
["hysteria-bot.service"]="Hysteria Telegram Bot"
|
||||
["wg-quick@wgcf.service"]="WireGuard (WARP)"
|
||||
declare -a service_order=(
|
||||
"hysteria-server.service|Hysteria2"
|
||||
"webpanel.service|Web Panel"
|
||||
"hysteria-bot.service|Telegram Bot"
|
||||
"normalsub.service|Normal Subscription"
|
||||
"singbox.service|Singbox Subscription"
|
||||
"wg-quick@wgcf.service|WireGuard (WARP)"
|
||||
)
|
||||
|
||||
for service in "${!service_names[@]}"; do
|
||||
for service_info in "${service_order[@]}"; do
|
||||
IFS="|" read -r service display_name <<< "$service_info"
|
||||
|
||||
if systemctl is-active --quiet "$service"; then
|
||||
echo -e "${NC}${service_names[$service]}:${green} Active${NC}"
|
||||
echo -e "${NC}${display_name}:${green} Active${NC}"
|
||||
else
|
||||
echo -e "${NC}${service_names[$service]}:${red} Inactive${NC}"
|
||||
echo -e "${NC}${display_name}:${red} Inactive${NC}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user