used services_status.sh for check_services
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
source /etc/hysteria/core/scripts/path.sh
|
source /etc/hysteria/core/scripts/path.sh
|
||||||
|
source /etc/hysteria/core/scripts/services_status.sh
|
||||||
|
|
||||||
# Function to define colors
|
# Function to define colors
|
||||||
define_colors() {
|
define_colors() {
|
||||||
@ -89,18 +90,12 @@ load_hysteria2_ips() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_services() {
|
check_services() {
|
||||||
declare -a service_order=(
|
|
||||||
"hysteria-server.service|Hysteria2"
|
for service in "${services[@]}"; do
|
||||||
"webpanel.service|Web Panel"
|
service_base_name=$(basename "$service" .service)
|
||||||
"hysteria-bot.service|Telegram Bot"
|
|
||||||
"normalsub.service|Normal Subscription"
|
display_name=$(echo "$service_base_name" | sed -E 's/([^-]+)-?/\u\1/g')
|
||||||
"singbox.service|Singbox Subscription"
|
|
||||||
"wg-quick@wgcf.service|WireGuard (WARP)"
|
|
||||||
)
|
|
||||||
|
|
||||||
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}${display_name}:${green} Active${NC}"
|
echo -e "${NC}${display_name}:${green} Active${NC}"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user