-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pdist: Add pdistd service for distmaster(s)
To implement out-update on boot, we need a way for a client to trigger a pdist-update for itself on its distmaster. Add a service for the distmaster(s), which allows a client to do that by connecting to a fixed port on the distmaster (`telnet deinemuddah 237`).
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 deletions.
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,15 @@ | ||
[Install] | ||
|
||
WantedBy=multiuser.target | ||
|
||
[Unit] | ||
|
||
After=startup-tags.service network.target | ||
ConditionPathExists=/node/tags/distmaster | ||
|
||
[Socket] | ||
|
||
ListenStream=237 | ||
ReusePort=yes | ||
Accept=yes | ||
|
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,8 @@ | ||
[Unit] | ||
|
||
CollectMode=inactive-or-failed | ||
|
||
[Service] | ||
|
||
StandardOutput=socket | ||
ExecStart=bash -c "read ip host <<< $(getent hosts ${REMOTE_ADDR}) ; echo update in progess... ; pdist push $host --timeout 60 --set-pdist-status" |