mirror of
https://github.com/10h30/kazewp.git
synced 2026-05-12 15:21:20 +09:00
Add functionality to restart Caddy from the interactive menu
This commit is contained in:
@@ -28,6 +28,9 @@ show_interactive_menu() {
|
||||
if [ -d "$WORDPRESS_DIR" ] && [ -n "$(find "$WORDPRESS_DIR" -mindepth 1 -type d 2>/dev/null)" ]; then
|
||||
print_menu_action "m" "Manage multiple sites"
|
||||
fi
|
||||
if [ -d "$CADDY_DIR" ] && [ -f "${CADDY_DIR}/compose.yaml" ]; then
|
||||
print_menu_action "r" "Restart Caddy"
|
||||
fi
|
||||
print_menu_action "q" "Quit"
|
||||
print_separator
|
||||
|
||||
@@ -40,6 +43,11 @@ show_interactive_menu() {
|
||||
"n" | "N")
|
||||
show_action_menu "new"
|
||||
;;
|
||||
"r" | "R")
|
||||
restart_sites caddy
|
||||
echo -e "${YELLOW}Caddy has been restarted${NC}"
|
||||
show_interactive_menu
|
||||
;;
|
||||
"m" | "M")
|
||||
show_multi_site_menu "${sites[@]}"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user