summaryrefslogtreecommitdiffstats
path: root/debian/systemd-coredump.postinst
blob: 1b93506d3d5293c985e76e17ce15410acc0bb58d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

set -e

if [ "$1" = configure ]; then
    adduser --quiet --system --group --no-create-home --home /run/systemd \
        --gecos "systemd Core Dumper" systemd-coredump

    # enable systemd-coredump right after package installation
    if [ -d /run/systemd/system ]; then
        systemctl daemon-reload && systemctl start systemd-coredump.socket || true
    fi
    /lib/systemd/systemd-sysctl /usr/lib/sysctl.d/50-coredump.conf || true
fi

#DEBHELPER#