Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#31378 - [redis] Missing systemd unit file
Attached to Project:
Community Packages
Opened by Eivind Uggedal (uggedal) - Saturday, 01 September 2012, 16:02 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 11 October 2012, 11:39 GMT
Opened by Eivind Uggedal (uggedal) - Saturday, 01 September 2012, 16:02 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 11 October 2012, 11:39 GMT
|
DetailsI've created a systemd service unit[1] for Redis and updated the PKGBUILD[2] (I also bumped the version to 2.4.17).
The unit file is compatible with the installed redis.conf since it detects the double fork from 'daemonize yes' and gets the PID from /run/redis.pid. On shutdown it calls '/usr/bin/redis-cli shutdown' before systemd potentially kills the process. In the limited systemd ini syntax I was unable to get a potential password from /etc/redis.conf to use with the redis-cli command like the rc script does. [1]: https://github.com/uggedal/pkg/blob/master/redis/redis.service [2]: https://github.com/uggedal/pkg/blob/master/redis/PKGBUILD |
This task depends upon
https://github.com/uggedal/pkg/commit/19a3baba08e5b09ad001a42993928800ca718916
https://github.com/antirez/redis/blob/2.4/src/redis.c#L564
https://github.com/antirez/redis/blob/2.4/src/db.c#L348
I'm not sure why the rc script does not rely on this.
[ -d /proc/${PID} ] && sleep ...
just to wait for daemon shutdown. Systemd probably does not need this.