This file is indexed.

postinst is in ifetch-tools 0.15.24d3-1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh

set -e

if [ -e /usr/share/debconf/confmodule ]
then
	. /usr/share/debconf/confmodule
fi

# Set the prompt to remove data, logs, and settings each removal.
db_fset ifetch-tools/purge seen false

case "${1}" in
	configure)
		if ! getent passwd "ifetch-tools" > /dev/null 2>&1
		then
			# Add new user account
			adduser --system --shell /bin/sh --disabled-password --home /dev/null --gecos 'ifetch-tools account' --group --quiet ifetch-tools
		elif ! getent group "ifetch-tools" > /dev/null 2>&1
		then
			# Add existing user to new new group
			addgroup --system --quiet ifetch-tools
			gpasswd -a ifetch-tools ifetch-tools
		fi

		mkdir -p /etc/ifetch-tools/cameras
		mkdir -p /var/log/ifetch-tools
		mkdir -p /var/lib/ifetch-tools

		chown ifetch-tools:ifetch-tools /var/log/ifetch-tools /etc/ifetch-tools /var/lib/ifetch-tools -R
		chmod 700 /etc/ifetch-tools /etc/ifetch-tools/cameras

		if [ ! -e /etc/ifetch-tools/ifetch-tools.conf ]
		then
			cp /usr/share/ifetch-tools/examples/ifetch-tools.conf /etc/ifetch-tools/ifetch-tools.conf
			chmod 600 /etc/ifetch-tools/ifetch-tools.conf
			chown ifetch-tools:ifetch-tools /etc/ifetch-tools/ifetch-tools.conf
		fi
		;;

	abort-upgrade|abort-remove|abort-deconfigure)

		;;

	*)
		echo "postinst called with unknown argument \`${1}'" >&2
		exit 1
		;;
esac

# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
	if [ -x "/etc/init.d/ifetch-tools" ]; then
		update-rc.d ifetch-tools defaults >/dev/null
	fi
	if [ -x "/etc/init.d/ifetch-tools" ] || [ -e "/etc/init/ifetch-tools.conf" ]; then
		invoke-rc.d ifetch-tools start || exit $?
	fi
fi
# End automatically added section


exit 0