bastos (owner)

Revisions

gist: 79867 Download_button fork
public
Description:
Little Script to reload a rails app on server for tests...
Public Clone URL: git://gist.github.com/79867.git
Embed All Files: show embed
Bash #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env sh
# On CRON:
# 00,15,30,45 * * * * /home/user/project/reload.sh >> /home/user/log/release_web.log 2>&1
echo "Rebuilding" > /home/user/project/current/public/index.html
# Update the code
svn update /home/user/project/current
# Run migrations
cd /home/user/project/current
rake RAILS_ENV=$RAILS_ENV db:migrate;
# Restart memcached.
/user/project/memcached-1.2.6/scripts/memcached-init restart
# Restart passenger intances
touch tmp/restart.txt
# Put the rebuild date in the public
date > /home/user/project/current/public/rebuild.txt
# Remove the message
rm /home/user/project/current/public/index.html