This file is indexed.

postinst is in motion 3.2.12-4.

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
#!/bin/sh
# postinst script for motion
# Made by Angel Carpintero

set -e


. /usr/share/debconf/confmodule

add_group_if_missing() {
    if [ -x /usr/sbin/addgroup ]; then
        if ! getent group motion >/dev/null; then
                addgroup --system --force-badname motion || true
        fi
    fi
}

add_user_if_missing() {
    if [ -x /usr/sbin/adduser ]; then
        if ! id -u motion > /dev/null 2>&1; then
            adduser --system --no-create-home \
		--disabled-password \
		--force-badname motion \
		--ingroup motion
	    adduser motion video
        fi
    fi
}

add_group_if_missing
add_user_if_missing

# Fix motion.conf permission
chmod 0640 /etc/motion/motion.conf
chgrp motion /etc/motion/motion.conf


db_stop

# Automatically added by dh_installinit
if [ -x "/etc/init.d/motion" ] || [ -e "/etc/init/motion.conf" ]; then
	if [ ! -e "/etc/init/motion.conf" ]; then
		update-rc.d motion start 60 2 3 4 5 . stop 60 0 1 6 . >/dev/null
	fi
	invoke-rc.d motion start || exit $?
fi
# End automatically added section


exit 0