Added Web Panel service
This commit is contained in:
@ -89,19 +89,22 @@ load_hysteria2_ips() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_services() {
|
check_services() {
|
||||||
declare -A service_names=(
|
declare -a service_order=(
|
||||||
["hysteria-server.service"]="Hysteria2"
|
"hysteria-server.service|Hysteria2"
|
||||||
["normalsub.service"]="Normal Subscription"
|
"webpanel.service|Web Panel"
|
||||||
["singbox.service"]="Singbox Subscription"
|
"hysteria-bot.service|Telegram Bot"
|
||||||
["hysteria-bot.service"]="Hysteria Telegram Bot"
|
"normalsub.service|Normal Subscription"
|
||||||
["wg-quick@wgcf.service"]="WireGuard (WARP)"
|
"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
|
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
|
else
|
||||||
echo -e "${NC}${service_names[$service]}:${red} Inactive${NC}"
|
echo -e "${NC}${display_name}:${red} Inactive${NC}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user