Remove status command and function from webpanel_shell.sh

This commit is contained in:
Iam54r1n4
2025-02-07 18:45:32 +00:00
parent 0980919eaa
commit 26ce040d67

View File

@ -196,20 +196,6 @@ show_webpanel_api_token() {
source /etc/hysteria/core/scripts/webpanel/.env source /etc/hysteria/core/scripts/webpanel/.env
echo "$API_TOKEN" echo "$API_TOKEN"
} }
show_webpanel_services_status() {
# Return both services' statuses in JSON format as true (if active) or false (otherwise)
local webpanel_status=$(systemctl is-active webpanel.service)
local caddy_status=$(systemctl is-active caddy.service)
local webpanel_active=false
local caddy_active=false
[[ "$webpanel_status" == "active" ]] && webpanel_active=true
[[ "$caddy_status" == "active" ]] && caddy_active=true
echo -e "{\"webpanel\": $webpanel_active, \"caddy\": $caddy_active}"
}
stop_service() { stop_service() {
echo "Stopping Caddy..." echo "Stopping Caddy..."
@ -240,9 +226,6 @@ case "$1" in
api-token) api-token)
show_webpanel_api_token show_webpanel_api_token
;; ;;
status)
show_webpanel_services_status
;;
*) *)
echo -e "${red}Usage: $0 {start|stop} <DOMAIN> <PORT> ${NC}" echo -e "${red}Usage: $0 {start|stop} <DOMAIN> <PORT> ${NC}"
exit 1 exit 1