All requests will load index.html, notes page reverted to rendering serverside
[oweals/finalsclub.git] / util / nightly-restart.sh
1 #!/bin/bash
2
3 ## this is the nightly restart script.
4 ## it should be used by cron, just makes sure we're in the correct path 
5 ## and env vars are set before restarting
6 ## cron example (pick different times for each server)
7 ## ## this does a staggerd restart of the server each night
8 ## 15 1 * * * /home/ec2-user/fc/util/nightly-restart.sh > /tmp/cron.nightly-restart.log
9
10
11 ## save of the current path
12 pushd .
13
14 cd ~/fc
15
16 ## make sure to load the env vars
17 source ~/.bashrc
18
19 ## restart the server using the normal restart script
20 ./restart
21
22 ## restore the previous path
23 popd