summaryrefslogtreecommitdiffstats
path: root/distro/pkg/deb/knot-resolver-core.postinst
blob: e98529876b17b80205a8585264ab6a5c4b170005 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-or-later
set -e

if [ "$1" = "configure" ]; then
    adduser --quiet --system --group --no-create-home --home /var/cache/knot-resolver knot-resolver
fi

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
    systemctl daemon-reload || true
    systemd-tmpfiles --create /usr/lib/tmpfiles.d/knot-resolver.conf
    systemctl try-restart knot-resolver.service || true
fi

#DEBHELPER#