From df83b8aa59e43870aa3d3e682c5f67f9eb985083 Mon Sep 17 00:00:00 2001 From: Ruben Date: Wed, 7 May 2025 14:41:02 +0200 Subject: [PATCH] fix: add option to restart service, not only reload --- certman.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/certman.sh b/certman.sh index 9f5a82d..3e26579 100755 --- a/certman.sh +++ b/certman.sh @@ -222,11 +222,13 @@ process_certificates() { # Reload service if needed if [ $service_reloaded -eq 1 ]; then - echo -e "${BLUE}Reloading $SERVICE_NAME service...${NC}" + echo -e "${BLUE}Reloading/restarting $SERVICE_NAME service...${NC}" if systemctl reload "$SERVICE_NAME"; then echo -e "${GREEN}Service reloaded successfully${NC}" + elif systemctl restart "$SERVICE_NAME"; then + echo -e "${GREEN}Service restarted successfully${NC}" else - echo -e "${RED}Failed to reload service${NC}" + echo -e "${RED}Failed to reload or restart service${NC}" return 1 fi fi