2022-04-20 12:06:18 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# This script is run once after an attempt to renew one or more certs.
|
|
|
|
|
|
|
|
# Array of services to reload. A default list of typical services is listed.
|
|
|
|
# Note that service will only be restarted if it's installed and active,
|
2024-06-13 13:19:10 -07:00
|
|
|
# it's safe to have inactive/unneeded services in this array, however those will trigger stderr messages.
|
2022-04-20 12:06:18 -07:00
|
|
|
# Change this to suit your needs.
|
2024-06-13 13:19:10 -07:00
|
|
|
services=(apache2 dovecot exim4)
|
2022-04-20 12:06:18 -07:00
|
|
|
|
|
|
|
# Cycle through each service.
|
|
|
|
for service in "${services[@]}"; do
|
2023-12-20 09:35:52 -08:00
|
|
|
# Reload service if it supports it. If not, stop and then start instead. This does nothing if the service is not running.
|
|
|
|
systemctl try-reload-or-restart $service
|
2022-04-20 12:06:18 -07:00
|
|
|
done
|