Skip to content

Commit

Permalink
sample systemd service unit
Browse files Browse the repository at this point in the history
  • Loading branch information
yoursunny committed Dec 10, 2024
1 parent a51cc80 commit dbc3ce8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ sudo ndpresponder -i eth0 -n 2001:db8:3988:486e:ff2f:add3:31e3:7b00/120
* `-n` flag specifies the IPv6 subnet to respond to.
You may repeat this flag to specify multiple subnets.

See [ndpresponder.service](ndpresponder.service) for a sample systemd unit file.

## Docker Network Mode

The program can respond to neighbor solicitations for assigned addresses in Docker networks.
Expand Down
18 changes: 18 additions & 0 deletions ndpresponder.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Unit]
Description=ndpresponder
After=network-online.target

[Service]
ExecStartPre=+/usr/bin/ip route get 2000::
ExecStart=+/usr/local/bin/ndpresponder -i eth0 -n 2001:db8:3988:486e:ff2f:add3:31e3:7b00/120
Restart=on-failure
RestartSec=10s
CPUAccounting=yes
CPUQuota=1%
ProtectSystem=full
PrivateTmp=yes
PrivateDevices=yes
ProtectHome=yes

[Install]
WantedBy=multi-user.target

0 comments on commit dbc3ce8

Please sign in to comment.