mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
nixos/redis: enforce owner/perms on /var/lib/redis (#18046)
Previously it was only set once, now it is enforced on each start-up of redis.service. Also set _ownership_ recursively, so that the /var/lib/redis/dump.rdb file is guaranteed to be accessible by the currently configured redis user. Fixes issue #9687, where redis wouldn't start because /var/lib/redis had wrong owner.
This commit is contained in:
parent
b170bed1ff
commit
26f65ae860
@ -234,9 +234,8 @@ in
|
||||
serviceConfig.Type = "oneshot";
|
||||
|
||||
script = ''
|
||||
if ! test -e ${cfg.dbpath}; then
|
||||
install -d -m0700 -o ${cfg.user} ${cfg.dbpath}
|
||||
fi
|
||||
install -d -m0700 -o ${cfg.user} ${cfg.dbpath}
|
||||
chown -R ${cfg.user} ${cfg.dbpath}
|
||||
'';
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user