-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add socket-activated systemd service for discovery
Introduce a system-wide daemon listening on /run/wsdd.socket, which is managed by systemd. When a client first connects to the socket the daemon is started. Multiple clients can connect and safely use the API simultaneously. The service runs in discovery-only mode. Uses multicast source-port 37020.
- Loading branch information
Showing
3 changed files
with
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=Web Services Dynamic Discovery service | ||
Documentation=man:wsdd(8) | ||
Requires=wsdd-discovery.socket | ||
RefuseManualStart=true | ||
|
||
[Service] | ||
Type=simple | ||
; The service is put into an empty runtime directory chroot, | ||
; i.e. the runtime directory which usually resides under /run | ||
ExecStart=/usr/bin/wsdd --shortlog --chroot=/run/wsdd --source-port=37020 --no-host --discovery | ||
DynamicUser=yes | ||
User=wsdd | ||
Group=wsdd | ||
RuntimeDirectory=wsdd | ||
AmbientCapabilities=CAP_SYS_CHROOT |
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,9 @@ | ||
[Unit] | ||
Description=Web Services Dynamic Discovery API socket | ||
Documentation=man:wsdd(8) | ||
|
||
[Socket] | ||
ListenStream=%t/wsdd.socket | ||
|
||
[Install] | ||
WantedBy=sockets.target |
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