File: postinst

package info (click to toggle)
nagios-snmp-plugins 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,832 kB
  • sloc: perl: 7,314; sh: 309; makefile: 50
file content (29 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

set -e

templdir=/usr/share/nagios-snmp-plugins/pluginconfig

if [ "$1" = "configure" ]; then
	if [ -f /usr/share/monitoring-plugins/dpkg/functions ]; then
		# only working with monitoring-plugins-basic
		. /usr/share/monitoring-plugins/dpkg/functions
		register_cfgs $2
	elif [ -f /usr/share/nagios-plugins/dpkg/functions ]; then
		# only working with nagios-plugins-basic (>= 1.4.5-2)
		. /usr/share/nagios-plugins/dpkg/functions
		register_cfgs $2
	else
		# to get working with etch
		(
			cd $templdir
			for f in *cfg; do
				ucf $f /etc/nagios-plugins/config/$f
			done
		);
	fi
fi

#DEBHELPER#

exit 0