summaryrefslogtreecommitdiffstats
path: root/debian/redis-server.postinst
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/redis-server.postinst24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/redis-server.postinst b/debian/redis-server.postinst
new file mode 100644
index 0000000..93e38be
--- /dev/null
+++ b/debian/redis-server.postinst
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -eu
+
+USER="redis"
+GROUP="$USER"
+CONFFILE="/etc/redis/redis.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/redis -maxdepth 1 -type d -name 'redis-server.*.d' -empty -delete
+fi
+
+exit 0