Stopping the turnover of /var/log/httpd/access_log

Discussion in 'Apple' started by paintedjazz, Dec 1, 2007.

  1. paintedjazz

    paintedjazz Guest

    I am running 10.4.10 and a while back, it was suggested to me that I
    could stop the turnover of /var/log/httpd/access_log by commenting out
    the lines below in /etc/periodic/weekly/500.weekly. However, this did
    not solve the problem. OSX continues the turnover of the access_log.

    Does anyone know how to solve this problem? Many thanks.

    if sw_vers -productName|grep -vq Server; then cd /var/log/httpd
    for i in access_log error_log; do
    if [ -f "${i}" ]; then
    printf %s " $i"
    if [ -x /usr/bin/gzip ]; then gzext=".gz"; else gzext="";
    if [ -f "${i}.3${gzext}" ]; then mv -f "${i}.3${gzext}" "$
    {i}.4${gzext}"; fi
    if [ -f "${i}.2${gzext}" ]; then mv -f "${i}.2${gzext}" "$
    {i}.3${gzext}"; fi
    if [ -f "${i}.1${gzext}" ]; then mv -f "${i}.1${gzext}" "$
    {i}.2${gzext}"; fi
    if [ -f "${i}.0${gzext}" ]; then mv -f "${i}.0${gzext}" "$
    {i}.1${gzext}"; fi
    if [ -f "${i}" ]; then mv -f "${i}" "${i}.0" && if [ -x /
    usr/bin/gzip ]; then gzip -9 "${i}.0"; fi; fi
    touch "${i}" && chmod 640 "${i}" && chown root:admin "$
    if [ -f /var/run/ ]; then /usr/sbin/apachectl restart; fi
    echo ""
    paintedjazz, Dec 1, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.