File: shibboleth-sp2-utils.postinst

package info (click to toggle)
shibboleth-sp2 2.6.0%2Bdfsg1-4%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,896 kB
  • sloc: cpp: 39,404; sh: 11,726; makefile: 866; xml: 371; ansic: 35
file content (22 lines) | stat: -rwxr-xr-x 598 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -e

# Add a user as which to run the shibd daemon.
if [ "$1" = "configure" ] ; then
    if ! getent passwd _shibd > /dev/null ; then
        echo 'Adding system user for Shibboleth daemon' 1>&2
        adduser --system --group --quiet --home /var/log/shibboleth \
            --no-create-home --disabled-login --force-badname _shibd
    fi

    for dir in /var/cache/shibboleth /var/log/shibboleth; do
        if ! dpkg-statoverride --list "$dir" >/dev/null 2>&1; then
            dpkg-statoverride --update --add _shibd _shibd 755 "$dir"
        fi
    done
fi

#DEBHELPER#

exit 0