File: conserver-client.postinst

package info (click to toggle)
conserver 8.2.1-1
  • links: PTS
  • area: non-free
  • in suites: stretch
  • size: 1,836 kB
  • ctags: 1,314
  • sloc: ansic: 22,099; sh: 3,507; makefile: 278
file content (29 lines) | stat: -rw-r--r-- 623 bytes parent folder | download | duplicates (6)
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/bash -e

conf=/etc/conserver/console.cf


if [ "$1" = "configure" -a -e /usr/share/debconf/confmodule ]; then
	. /usr/share/debconf/confmodule

	if [ ! -e $conf ]; then
		cp /usr/share/conserver-client/console.cf $conf
	fi

	db_get conserver-client/config
	if [ "$RET" = "true" ]; then

		touch $conf
		db_get conserver-client/server
		perl -pi -e "s/master(\s+)([^;]+);/master\${1}$RET;/" $conf
		db_get conserver-client/port
		perl -pi -e "s/port(\s+)([^;]+);/port\${1}$RET;/"     $conf
	fi
fi

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#