Fire off a task when something is written under /etc/opensnitchd #1605
ashugg
started this conversation in
Development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Question: is there some way to get opensnitch to either run a task, or touch a file like
/tmp/.opensnitch_rules_updated, when it writes or deletes a rule in /etc/opensnitchd/rules?I use etckeeper on my Ubuntu systems to keep /etc files under version control. When I remember, after allowing a new connection with the opensnitch gui, I run
sudo etckeeper commit "Commit for opensnitchd rules"so that any files added, removed, or modified by opensnitch get wrapped up in a git commit. The problem is that sometimes I forget to do this, and maybe mess around with something else, so then my nextsudo etckeeper commitincludes opensnitch changes as well as whatever I was meaning to commit.I can monitor /etc/opensnitchd/system-fw.json with systemd and run an
etckeeper commitif that file is modified. However, I don't think systemd can watch a directory for files appearing, changing, or disappearing unless their names are known ahead of time.All reactions