Community Packages

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!
Tasklist

FS#41093 - [squid] Use systemd timers instead of cron jobs.

Attached to Project: Community Packages
Opened by Hussam Al-Tayeb (hussam) - Friday, 04 July 2014, 23:36 GMT
Last edited by Sébastien Luttringer (seblu) - Saturday, 27 September 2014, 22:33 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

/usr/lib/systemd/system/squid-logs.timer
[Unit]
Description=Rotate Squid log files

[Timer]
OnCalendar=weekly
AccuracySec=12h
Persistent=true



/usr/lib/systemd/system/squid-logs.service
[Unit]
Description=Rotate Squid log files

[Service]
Type=oneshot
ExecStart=/usr/bin/squid -k rotate
Nice=19
IOSchedulingClass=best-effort
IOSchedulingPriority=7


and add the following to the PKGBUILD:

install -D -m644 ${srcdir}/squid-logs.timer ${pkgdir}/usr/lib/systemd/system/squid-logs.timer
install -D -m644 ${srcdir}/squid-logs.service ${pkgdir}/usr/lib/systemd/system/squid-logs.service
install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
ln -s ../squid-logs.timer ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants/squid-logs.timer

It might need some fixing but this is the general idea. (look at the "shadow" package for a better example).
This task depends upon

Closed by  Sébastien Luttringer (seblu)
Saturday, 27 September 2014, 22:33 GMT
Reason for closing:  Implemented
Additional comments about closing:  squid-3.4.7-2
Comment by Sébastien Luttringer (seblu) - Saturday, 27 September 2014, 13:04 GMT
Moreover, the cron job is never executed, because comparaison between symlink and squid binary is never true.

Loading...