File: postinst

package info (click to toggle)
iptraf 1.3.0-5
  • links: PTS
  • area: main
  • in suites: slink
  • size: 904 kB
  • ctags: 782
  • sloc: ansic: 7,708; makefile: 99; sh: 40
file content (23 lines) | stat: -rw-r--r-- 425 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

set -e

if [ -e /var/lib/iptraf/iptraf.cfg ]
then
	mv /var/lib/iptraf/iptraf.cfg /etc/iptraf.cfg
fi

if command -v install-docs >/dev/null 2>&1; then
	install-docs -i /usr/share/doc-base/iptraf
fi

if echo $2 | grep -q "1.2.0"
then
	echo "Upgrading configuration files"
	if echo $2 | grep -q "1.1.0" || echo $2 | grep -q "1.0.0"
	then
		/usr/lib/iptraf/cfconv-1.1_to_1.2
	fi
	/usr/lib/iptraf/cfconv-1.2_to_1.3
fi