dragonfly/tools/packaging/debian/dragonfly.postinst
Boaz Sade 57e3ec9a81
feat(build): debian package building (#689)
Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
2023-01-16 17:44:53 +02:00

26 lines
469 B
Bash
Executable file

#!/bin/sh
# Script to run at the end of the installation
set -eu
USER="dfly"
DIR_NAME="dragonfly"
GROUP="$USER"
CONFFILE="/etc/${DIR_NAME}/${DIR_NAME}.conf"
if [ "$1" = "configure" ]
then
if ! dpkg-statoverride --list ${CONFFILE} >/dev/null 2>&1
then
dpkg-statoverride --update --add ${USER} ${GROUP} 640 ${CONFFILE}
fi
fi
#DEBHELPER#
if [ "$1" = "configure" ]
then
find /etc/${DIR_NAME} -maxdepth 1 -type d -name '${DIR_NAME}.*.d' -empty -delete
fi
exit 0