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