File: tinyproxy.postinst

package info (click to toggle)
tinyproxy 1.11.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 912 kB
  • sloc: ansic: 6,361; sh: 359; perl: 351; makefile: 190; awk: 4
file content (35 lines) | stat: -rw-r--r-- 947 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
30
31
32
33
34
35
#!/bin/sh

set -e

case "$1" in
    configure)
        # Create a tinyproxy system group
        if ! getent group tinyproxy > /dev/null; then
            addgroup --quiet --system tinyproxy
        fi

        # Create a tinyproxy system user
        if ! getent passwd tinyproxy > /dev/null; then
            adduser --quiet --system \
                --ingroup tinyproxy \
                --home /run/tinyproxy \
                --disabled-password --shell /bin/false \
                tinyproxy
            usermod -c "Tinyproxy daemon" tinyproxy
        fi

        chmod 750 /var/log/tinyproxy
        chmod 640 /var/log/tinyproxy/* 2>/dev/null || true
        chown tinyproxy:adm /var/log/tinyproxy
        chown tinyproxy:adm /var/log/tinyproxy/* 2>/dev/null || true
    ;;
    abort-upgrade|abort-remove|abort-deconfigure)
    ;;
    *)
        echo "ERROR: Postinst called with unknown argument!"
        exit 0
    ;;
esac

#DEBHELPER#