File: postinst

package info (click to toggle)
mopd 1%3A2.5.3-21
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 780 kB
  • sloc: ansic: 4,871; makefile: 176; sh: 163
file content (27 lines) | stat: -rw-r--r-- 635 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
#!/bin/sh -e

CONF_FILE=/etc/mopd.conf

# Source debconf library.
. /usr/share/debconf/confmodule

db_get mopd/interface
if [ ! -e "$CONF_FILE" ]; then
	cat > $CONF_FILE <<EOF
# /etc/mopd.conf
# This file configures the interface mopd will listen on
# This configuration was created by debconf.
# format
# INTERFACE=iface
# Where iface is an individual interface (eth0, for example) or the 
# keyword 'all' to indicate mopd should listen on all interfaces.
EOF

	echo "INTERFACE=$RET" >> $CONF_FILE
else
	sed -e "s/^[^#]*INTERFACE=.*/INTERFACE=$RET/" < $CONF_FILE > ${CONF_FILE}.new
	mv -f ${CONF_FILE}.new $CONF_FILE

fi
#DEBHELPER#