mirror of
https://codeberg.org/icewind/netnsd.git
synced 2026-06-03 09:04:07 +02:00
add systemd service example
This commit is contained in:
parent
1964551e9d
commit
53f5f45865
2 changed files with 17 additions and 0 deletions
|
|
@ -19,6 +19,9 @@ netnsd daemon [--config <config.toml>]
|
|||
Start the `netnsd` daemon, applying the configured namespace configuration and
|
||||
running any proxies.
|
||||
|
||||
See the [systemd service example](./netnsd.service) for an example of how to run
|
||||
the daemon with systemd.
|
||||
|
||||
You can tell the daemon to reload the configuration with `pkill -sighup netnsd`.
|
||||
|
||||
Note that, to minimize interruption of anything using the namespaces, stopping
|
||||
|
|
|
|||
14
netnsd.service
Normal file
14
netnsd.service
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Before=network.target
|
||||
|
||||
[Service]
|
||||
# Set the log level
|
||||
Environment="RUST_LOG=info"
|
||||
ExecStart=/usr/bin/netnsd daemon
|
||||
Restart=on-failure
|
||||
# Tell systemd to send SIGUP when reloading the service instead of restarting the process.
|
||||
# This lets the user reload the config without interrupting any open forwarded connections.
|
||||
Type=notify-reload
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue