mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 15:13:33 +01:00
gift: script ro reload Apache2 by systemd timer script (no issue!) #393
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tobwen on GitHub (Dec 22, 2018).
This isn't an issue, just a small gift for everyone, who uses systemd (tested on Debian Stretch):
Warning: I've setup dehydrated with user dehydrated, I don't want this to run as root:
adduser --system --no-create-home --group dehydratedThen I've added all the details to a global config:
Setup a hook to reload apache2:
And finally setup systemd timers:
You could add stuff like OnFailure to get informed via mail, Slack etc. Thanks a lot to #systemd on freenode.
Edit
Oops, seems like the hook gets run a user dehydrated. PolicyKit disallows to restart apache2.service of course. So it's up to user either to fix it in PolicyKit, sudo or to simply run the service as root.
@lukas2511 commented on GitHub (Jan 10, 2019):
Closing: Not a bug
You can add stuff like this to the wiki. It's open for user contribution. Thanks.