A better way to specify netns
See docs: https://www.freedesktop.org/software/systemd/man/systemd.exec.html#NetworkNamespacePath=
This commit is contained in:
@ -6,7 +6,8 @@ ConditionPathExists=/etc/snmp/snmpd.conf
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStartPre=/bin/mkdir -p /var/run/agentx-dataplane/
|
ExecStartPre=/bin/mkdir -p /var/run/agentx-dataplane/
|
||||||
ExecStart=/sbin/ip netns exec dataplane /usr/sbin/snmpd -LOw -u Debian-snmp -g vpp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd-dataplane.pid
|
NetworkNamespacePath=/var/run/netns/dataplane
|
||||||
|
ExecStart=/usr/sbin/snmpd -LOw -u Debian-snmp -g vpp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd-dataplane.pid
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -5,7 +5,8 @@ ConditionPathExists=/etc/snmp/snmpd.conf
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/sbin/ip netns exec dataplane /usr/local/sbin/vpp-snmp-agent
|
NetworkNamespacePath=/var/run/netns/dataplane
|
||||||
|
ExecStart=/usr/local/sbin/vpp-snmp-agent
|
||||||
Group=vpp
|
Group=vpp
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
Reference in New Issue
Block a user