#!/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.rb --file $logfile.gz --dir logs/rails && rm $logfile.gz fi fi for f in `ls /mnt/log/web_proxy/*.log` ; do logfile=$f-`date +%Y%m%d` if [ -e $logfile ] ; then gzip $logfile /usr/local/ec2onrails/bin/archive_file.rb --file $logfile.gz --dir logs/web_proxy && rm $logfile.gz fi done