Implement get-webpanel-api-token command

This commit is contained in:
Iam54r1n4
2025-02-05 19:34:31 +00:00
parent 287253da0a
commit 82394d6b6c
3 changed files with 26 additions and 3 deletions

View File

@ -169,6 +169,11 @@ show_webpanel_url() {
echo "$webpanel_url"
}
show_webpanel_api_token() {
source /etc/hysteria/core/scripts/webpanel/.env
echo "$API_TOKEN"
}
stop_service() {
echo "Stopping Caddy..."
systemctl disable caddy.service
@ -195,6 +200,9 @@ case "$1" in
url)
show_webpanel_url
;;
api-token)
show_webpanel_api_token
;;
*)
echo -e "${red}Usage: $0 {start|stop} <DOMAIN> <PORT> ${NC}"
exit 1