gentoo/net-proxy/squid/files/squid.cron-r1
Hank Leininger e3a9968929
net-proxy/squid: add 6.9
Fix some gcc-14 compilation issues, add upstream memleak fix patch,
init script & logrotate/cron fixes.

Closes: https://bugs.gentoo.org/932742
Closes: https://bugs.gentoo.org/931123
Closes: https://bugs.gentoo.org/932744
Closes: https://bugs.gentoo.org/932750
Signed-off-by: Hank Leininger <hlein@korelogic.com>
Closes: https://github.com/gentoo/gentoo/pull/36815
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
2024-07-03 16:26:37 +03:00

16 lines
594 B
Bash

#!/bin/sh
# OpenRC init script supports multiple Squid instances, and exposes 'rotate'.
if command -v rc-service >/dev/null; then
SQUID_SERVICES=$(rc-status | awk '/ *squid.* started /{print $1}')
for SQUID_SERVICE in $SQUID_SERVICES ; do
rc-service "${SQUID_SERVICE}" rotate
done
# Systemd unit file supports only a single default squid instance,
# and no 'rotate' support, so call squid directly.
elif command -v systemctl >/dev/null; then
SQUID_ACTIVE=$(systemctl --type=service --state=active | awk '/^ *squid\.service / {print $1}')
[ -n "${SQUID_ACTIVE}" ] && squid -k rotate
fi