File: postinst

package info (click to toggle)
analog 2:6.0-22
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 6,772 kB
  • sloc: ansic: 45,186; makefile: 279; perl: 249; sh: 49
file content (25 lines) | stat: -rw-r--r-- 679 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
24
25
#!/bin/sh
set -e
. /usr/share/debconf/confmodule

db_get analog/anlgform
if [ "$RET" = true ]; then
	mkdir -p /usr/lib/cgi-bin
	if ! ln -f /usr/share/analog/anlgform.pl /usr/lib/cgi-bin/anlgform.cgi; then
		echo "warning: Failed to hard link anlgform.cgi. Using a soft link." >&2
		echo "warning: The soft link may not work for some web servers." >&2
		ln -sf /usr/share/analog/anlgform.pl /usr/lib/cgi-bin/anlgform.cgi
	fi
else
	rm -f /usr/lib/cgi-bin/anlgform.cgi
fi

# File moved
if [ -e /var/lib/analog/dnscache ]; then
	mv -f /var/lib/analog/dnscache /var/cache/analog/
fi
if [ -d /var/lib/analog ]; then
	rmdir --ignore-fail-on-non-empty -p /var/lib/analog
fi

#DEBHELPER#