fix: add option to restart service, not only reload
This commit is contained in:
parent
5c706ba5d4
commit
df83b8aa59
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue