-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade fate to add systemd integration and add netrics-specific conf…
…ig template
- Loading branch information
Showing
2 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
[Unit] | ||
Description={{ label }} controller service | ||
|
||
# | ||
# Would also make sense to have path files s.t. (re)-loaded IFF these are modified. | ||
# | ||
# https://manpages.debian.org/stretch/systemd/systemd.path.5.en.html | ||
# | ||
# ConditionPathExistsGlob=…/tasks.* | ||
# ConditionPathExistsGlob=…/defaults.* | ||
# | ||
|
||
StartLimitIntervalSec=1 | ||
StartLimitBurst=1 | ||
|
||
|
||
[Service] | ||
Environment=PATH="{{ env_path }}" | ||
|
||
ExecStart="{{ install_path }}"/netrics.d --foreground | ||
|
||
# | ||
# Eventually: | ||
# | ||
# * will want to handle kill gracefully... | ||
# * ...and hup or whatever to reload configuration | ||
# * ...and perhaps here can indicate that certain paths (config) are watched for changes to trigger reload | ||
# | ||
# Might also set an exec condition that config exists (for generic Fate anyway). | ||
# | ||
|
||
Restart=on-failure | ||
|
||
# | ||
# Might be useful here... | ||
# | ||
# ...Or might be annoying with permissions; (perhaps will want to set user in conf instead). | ||
# | ||
# User=netrics | ||
# | ||
|
||
|
||
[Install] | ||
# | ||
# Start service based on assignment of (local) IP address | ||
# | ||
# (I.e. don't bother with WAN tests if we're not yet connected to LAN.) | ||
# | ||
WantedBy=network-online.target |