summaryrefslogtreecommitdiff
path: root/community/redis/redis.install
diff options
context:
space:
mode:
Diffstat (limited to 'community/redis/redis.install')
-rw-r--r--community/redis/redis.install14
1 files changed, 14 insertions, 0 deletions
diff --git a/community/redis/redis.install b/community/redis/redis.install
new file mode 100644
index 000000000..058a68f80
--- /dev/null
+++ b/community/redis/redis.install
@@ -0,0 +1,14 @@
+post_install() {
+ grep -E "^redis:" etc/group >/dev/null || groupadd --system redis
+ grep -E "^redis:" etc/passwd >/dev/null || useradd --system -g redis -d /var/lib/redis -s /bin/false redis
+ touch var/log/redis.log
+ chown redis:redis var/log/redis.log
+ systemd-tmpfiles --create redis.conf
+ install -dm0700 var/lib/redis
+ chown -R redis:redis var/lib/redis
+}
+
+post_upgrade() {
+ post_install
+ echo "Redis starts from redis user by default. Check redis.service file"
+}