#!/bin/sh #NOTE: you can also call # /usr/local/ec2onrails/bin/exec_runner # to run a script under a specific role # see the file for details if test -e /mnt/app/current; then cd /mnt/app/current if test -e /mnt/app/current/script/cron/monthly; then if test -f /mnt/app/current/script/cron/monthly; then sudo -u app /usr/local/ec2onrails/bin/rails_env script/cron/monthly; else for f in script/cron/monthly/*; do if test -f $f; then sudo -u app /usr/local/ec2onrails/bin/rails_env $f fi done fi exit 0; fi #DEPRECATED: just for old usage.... if test -e /mnt/app/current/script/monthly then sudo -u app /usr/local/ec2onrails/bin/rails_env script/monthly exit 0; fi fi