diff options
Diffstat (limited to 'debian/minecproxy.postinst')
-rw-r--r-- | debian/minecproxy.postinst | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/minecproxy.postinst b/debian/minecproxy.postinst new file mode 100644 index 0000000..de176df --- /dev/null +++ b/debian/minecproxy.postinst @@ -0,0 +1,28 @@ +#!/bin/sh + +set -e + +case "$1" in +configure) + # Create minecproxy user (if not already done)... + adduser --system --group --home /var/lib/minecproxy \ + --quiet --gecos "Minecraft proxy daemon" minecproxy + + # ...create the directory (could've been removed during a purge + # but the user isn't, and adduser won't recreate the dir then)... + mkdir /var/lib/minecproxy > /dev/null 2>&1 || true + + # ...change traditional Unix permissions permissions... + chown minecproxy:minecproxy /var/lib/minecproxy + + # ...and restore SELinux context. + if which restorecon >/dev/null 2>&1; then + restorecon /var/lib/minecproxy + fi + + ;; +esac + +#DEBHELPER# + +exit 0 |