File: postinst

package info (click to toggle)
faqomatic 2.721-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,984 kB
  • ctags: 548
  • sloc: perl: 13,356; sh: 69; makefile: 47
file content (29 lines) | stat: -rw-r--r-- 773 bytes parent folder | download | duplicates (2)
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 -e

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

	FOM=/usr/lib/cgi-bin/fom
	db_get faqomatic/encrypted-password || RET=\*
	cat > $FOM.dpkg-tmp <<EOF
#!/usr/bin/perl -wT
# This file is generated automatically -- edit /etc/fom.conf.
# Run \`dpkg-reconfigure faqomatic' to change the temporary password.

use lib '.';		# for suid installations
\$ENV{'PATH'} = '';	# for suid installations

\$DATADIR = 'meta/';
do '/etc/fom.conf';

\$temporaryCryptedPassword = 7;  # avoid bogus warning
\$temporaryCryptedPassword = '$RET';
use FAQ::OMatic::dispatch;
FAQ::OMatic::dispatch::main(\$DATADIR);
EOF
	# Some web servers, e.g. thttpd, insist on world readable files.
	chmod 755 $FOM.dpkg-tmp
	mv $FOM.dpkg-tmp $FOM
fi

#DEBHELPER#