Created
June 4, 2015 16:49
-
-
Save jbodah/2ef4387a0a7f9226aa40 to your computer and use it in GitHub Desktop.
yard cron
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cron | |
* * * * * ~/yard/restart_server > ~/yard/restart_server.log 2>&1 | |
# restart_servers | |
#! /usr/bin/env bash | |
echo 'Killing yard server...' | |
ps aux | grep 'yard server' | grep -v 'grep' | awk '{ print $2 }' | xargs kill | |
echo 'Pulling new code...' | |
cd /home/vagrant/yard && git pull | |
echo 'Starting yard server...' | |
export PATH=/home/vagrant/.rbenv/shims:/home/vagrant/.rbenv/bin:/usr/bin:$PATH; | |
eval "$(rbenv init -)" | |
yard server -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment