Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mskarbek/1444916613c501e8b2e67a3ad1aee5a0 to your computer and use it in GitHub Desktop.
Save mskarbek/1444916613c501e8b2e67a3ad1aee5a0 to your computer and use it in GitHub Desktop.
[Unit]
Description=firewalld reload hook - run a hook script on firewalld reload
Wants=dbus-broker.service
After=dbus-broker.service
[Service]
Type=simple
ExecStart=/bin/bash -c '/bin/busctl monitor --system --json=short --match "interface=org.fedoraproject.FirewallD1,member=Reloaded" | while read -r line ; do [ -x /usr/local/sbin/firewalld-reload-hook ] && /usr/local/sbin/firewalld-reload-hook ; done'
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment