Move to an envfile for the debian package
This commit is contained in:
1
debian/rules
vendored
1
debian/rules
vendored
@ -15,6 +15,7 @@ override_dh_auto_build:
|
||||
override_dh_auto_install:
|
||||
install -D -m 0755 govpp-snmp-agentx debian/govpp-snmp-agentx/usr/sbin/govpp-snmp-agentx
|
||||
install -D -m 0644 govpp-snmp-agentx.service debian/govpp-snmp-agentx/lib/systemd/system/govpp-snmp-agentx.service
|
||||
install -D -m 0644 govpp-snmp-agentx.default debian/govpp-snmp-agentx/etc/default/govpp-snmp-agentx
|
||||
install -D -m 0644 docs/govpp-snmp-agentx.1 debian/govpp-snmp-agentx/usr/share/man/man1/govpp-snmp-agentx.1
|
||||
|
||||
override_dh_auto_configure:
|
||||
|
15
govpp-snmp-agentx.default
Normal file
15
govpp-snmp-agentx.default
Normal file
@ -0,0 +1,15 @@
|
||||
# Default configuration for govpp-snmp-agentx
|
||||
# This file contains environment variables for the GoVPP SNMP AgentX daemon
|
||||
#
|
||||
# Command line flags for govpp-snmp-agentx
|
||||
GOVPP_SNMP_AGENTX_FLAGS="-agentx.addr /var/agentx/master -vppcfg /etc/vpp/vppcfg.yaml -vppstats.period 10"
|
||||
|
||||
# Additional options that can be added to GOVPP_SNMP_AGENTX_FLAGS:
|
||||
# -debug Enable debug logging
|
||||
# -agentx.addr host:port SNMPd Agentx address (example: localhost:705)
|
||||
# -vppstats.api.addr PATH VPP API socket path (default: /var/run/vpp/api.sock)
|
||||
# -vppstats.stats.addr PATH VPP stats socket path (default: /var/run/vpp/stats.sock)
|
||||
# -vppstats.ifindex-offset NUM Interface index offset (default: 1000)
|
||||
#
|
||||
# Example with debug logging:
|
||||
# GOVPP_SNMP_AGENTX_FLAGS="-agentx.addr localhost:705 -vppcfg /etc/vpp/vppcfg.yaml -vppstats.period 10 -debug"
|
@ -4,9 +4,10 @@ After=network.target vpp.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=-/etc/default/govpp-snmp-agentx
|
||||
ExecStartPre=-+/usr/bin/chmod 770 /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
|
||||
ExecStart=/usr/sbin/govpp-snmp-agentx $GOVPP_SNMP_AGENTX_FLAGS
|
||||
User=Debian-snmp
|
||||
Group=vpp
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
Reference in New Issue
Block a user