Today cache_swap.sh runs 'squid -z' as many times as squid.conf cache_dir occurrences. It can run only once if at least one directory structure is missing. I suggest the following script, that: - Run 'squid -z' only once. - Check if base cache_dir directory exists. - Does not redirect squid's output to a file. These days we have journald to nicely put everything in the normal logs (be the journal or classic syslog). - Use Bash's features ([[, <<<). - Replace grep/sed with just awk. - Drop squid.sysconfig use. cache_swap.sh **************************** #!/bin/bash CACHE_SWAP=$(awk '/^cache_dir/ {print $3}' < /etc/squid/squid.conf) run=0 if [[ $CACHE_SWAP ]]; then while read adir; do if [[ -d $adir && ! -d $adir/00 ]]; then run=1 break fi done <<< "$CACHE_SWAP" fi if [[ $run == 1 ]]; then squid -N -z || exit 1 fi exit 0 **************************** squid is still called with '-N' for now (see bug 168592). Then drop from squid.sysconfig: SQUID_SHUTDOWN_TIMEOUT: not used. A leftover from the long gone SysV script. SQUID_CONF: redundant AFAIU. At compile time, default configuration file path is hardcoded into squid binary. '-f /path' is only needed when we want override it. I may be missing something, but is there a usecase that justify keeping it? It will demand changes to squid.service too, removing '-f $SQUID_CONF' there. This can be done along with (urgent) modifications needed for bug 1176318 and bug 1145235.
> > squid is still called with '-N' for now (see bug 168592). Sorry, wrong bug. I mean bug 1168592.
Squid accepts leading spaces/tabs in squid.conf. Catch that in awk: cache_swap.sh **************************** #!/bin/bash CACHE_SWAP=$(awk '/^\s*cache_dir/ {print $3}' < /etc/squid/squid.conf) run=0 if [[ $CACHE_SWAP ]]; then while read adir; do if [[ -d $adir && ! -d $adir/00 ]]; then run=1 break fi done <<< "$CACHE_SWAP" fi if [[ $run == 1 ]]; then squid -N -z || exit 1 fi exit 0 ****************************
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
New version that creates the SSL DB: cache_swap.sh **************************** #!/bin/bash CACHE_SWAP=$(awk '/^\s*cache_dir/ {print $3}' < /etc/squid/squid.conf) run=0 if [[ $CACHE_SWAP ]]; then while read adir; do if [[ -d $adir && ! -d $adir/00 ]]; then run=1 break fi done <<< "$CACHE_SWAP" fi if [[ $run == 1 ]]; then squid -N -z || exit 1 fi if [[ ! -d /var/lib/squid/ssl_db ]]; then if [[ -x /usr/lib64/squid/ssl_crtd ]]; then runuser -u squid -- /usr/lib64/squid/ssl_crtd -c -s /var/lib/squid/ssl_db else runuser -u squid -- /usr/lib/squid/ssl_crtd -c -s /var/lib/squid/ssl_db fi fi exit 0 **************************** See bug 1195807.
This message is a reminder that Fedora 21 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '21'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 21 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.