Skip to content

Commit

Permalink
Update opensnitchd.service
Browse files Browse the repository at this point in the history
Applied suggested changes by @lainedfles
  • Loading branch information
TriMoon authored Sep 4, 2023
1 parent 8545b39 commit 8c99b0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions daemon/opensnitchd.service
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ Type=exec
ConfigurationDirectory=%N/rules
ConfigurationDirectoryMode=0700

Environment='custom_cfg=%E/%N/rules'
# Environment='opts=-debug'
# Add extra options to the daemon below. fe.'opts=-debug' to add the '-debug' option.
Environment='opts='

ExecCondition=%N -check-requirements
ExecStart=%N -rules-path $custom_cfg $opts
ExecStart=%N -rules-path $CONFIGURATION_DIRECTORY $opts

# Signal-info was taken from the init.d script, but it just exits and then systemd restarts the service...
ExecReload=kill -HUP $MAINPID
Expand Down

2 comments on commit 8c99b0e

@TriMoon
Copy link
Author

@TriMoon TriMoon commented on 8c99b0e Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind that replacing custom_cfg with $CONFIGURATION_DIRECTORY this way will prevent the admin from overriding, the rules directory used, using drop-in's if (s)he chooses so.

If people like the idea of being able to override like that, we could undo THAT change...
If we undo that change, maybe we should rename custom_cfg into rules_path or custom_rules_path to better reflect it's purpose 😉

@TriMoon
Copy link
Author

@TriMoon TriMoon commented on 8c99b0e Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although at second thought, the ConfigurationDirectory= setting could be overridden by the admin also... 🤦‍♀️

Please sign in to comment.