Sha256: 8af5282af95a126dba94025e2d9f9d5c3dff99dfd66736871734039ec12c8213

Contents?: true

Size: 727 Bytes

Versions: 1

Compression:

Stored size: 727 Bytes

Contents

#!/bin/sh

RAILS_ENV=`/usr/local/ec2onrails/bin/rails_env`

if [ -x /mnt/app/current ] ; then
  logfile=/mnt/app/current/log/$RAILS_ENV.log-`date +%Y%m%d`
  if [ -e $logfile ] ; then
    gzip $logfile
    /usr/local/ec2onrails/bin/archive_file --file $logfile.gz --dir logs/rails && rm $logfile.gz
  fi
fi

for f in `ls /mnt/log/nginx/*.log` ; do
  logfile=$f-`date +%Y%m%d`
  if [ -e $logfile ] ; then
    gzip $logfile
    /usr/local/ec2onrails/bin/archive_file --file $logfile.gz --dir logs/nginx && rm $logfile.gz
  fi
done

logfile=/mnt/log/varnish/varnishncsa.log-`date +%Y%m%d`
if [ -e $logfile ] ; then
  gzip $logfile
  /usr/local/ec2onrails/bin/archive_file --file $logfile.gz --dir logs/varnish && rm $logfile.gz
fi

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pauldowman-ec2onrails-0.9.10.2 server/files/etc/cron.daily/logrotate_post