desktop/redis/redis.install
2013-10-16 05:19:32 +00:00

15 lines
479 B
Plaintext

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"
}