Add argparse and a few useful arguments
Now that we're explicitly connecting via TCP to localhost:705 (which can be overriden by the -a flag), we no longer need to run as root. Therefore, update vpp-snmp-agent.service to run as user Debian-snmp group vpp, so that /run/vpp/{api,stats}.sock are writable. Be explicit on the commandline arguments in the service definition.
This commit is contained in:
@ -6,7 +6,8 @@ ConditionPathExists=/etc/snmp/snmpd.conf
|
||||
[Service]
|
||||
Type=simple
|
||||
NetworkNamespacePath=/var/run/netns/dataplane
|
||||
ExecStart=/usr/sbin/vpp-snmp-agent
|
||||
ExecStart=/usr/sbin/vpp-snmp-agent -a localhost:705 -p 30
|
||||
User=Debian-snmp
|
||||
Group=vpp
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
Reference in New Issue
Block a user