Simplify service file, no longer require permissions on /run/vpp, and set optimal perms on agentx
This commit is contained in:
5
debian/postinst
vendored
5
debian/postinst
vendored
@ -4,11 +4,6 @@ set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
# Create agentx directories
|
||||
mkdir -p /var/agentx/master
|
||||
chown Debian-snmp:vpp /var/agentx /var/agentx/master
|
||||
chmod 770 /var/agentx /var/agentx/master
|
||||
|
||||
# Enable and start the service
|
||||
systemctl daemon-reload
|
||||
systemctl enable govpp-snmp-agentx.service
|
||||
|
1
debian/rules
vendored
1
debian/rules
vendored
@ -25,4 +25,5 @@ override_dh_auto_test:
|
||||
|
||||
override_dh_auto_clean:
|
||||
rm -f govpp-snmp-agentx
|
||||
[ -d debian/go ] && chmod -R +w debian/go || true
|
||||
rm -rf debian/.gocache debian/go obj-*
|
@ -1,14 +1,11 @@
|
||||
[Unit]
|
||||
Description=GoVPP SNMP AgentX Daemon
|
||||
After=network.target vpp.service
|
||||
Requires=netns-dataplane.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=-+/usr/bin/chmod 660 /run/vpp/stats.sock /run/vpp/api.sock /run/vpp/cli.sock
|
||||
ExecStartPre=-+/usr/bin/chown :vpp /run/vpp/stats.sock /run/vpp/api.sock /run/vpp/cli.sock
|
||||
ExecStartPre=-+/usr/bin/chmod 770 /var/agentx /var/agentx/master
|
||||
ExecStartPre=-+/usr/bin/chown :vpp /var/agentx /var/agentx/master
|
||||
ExecStartPre=-+/usr/bin/chown Debian-snmp:vpp /var/agentx /var/agentx/master
|
||||
ExecStart=/usr/sbin/govpp-snmp-agentx -agentx.addr /var/agentx/master -vppcfg /etc/vpp/vppcfg.yaml -vppstats.period 10
|
||||
User=Debian-snmp
|
||||
Group=vpp
|
||||
|
Reference in New Issue
Block a user