Skip to content

Instantly share code, notes, and snippets.

@rhaamo
Created June 4, 2010 13:46
Show Gist options
  • Save rhaamo/425428 to your computer and use it in GitHub Desktop.
Save rhaamo/425428 to your computer and use it in GitHub Desktop.
# crontab -u git -l
*/5 * * * * /home/git/aq3/cron.sh >> /home/git/aq3/log/cron.log
# cat /home/git/aq3/cron.sh
#!/bin/sh
# vim:set et sts=4 ts=4 tw=80:
echo "================================================="
echo "== Started: `date`"
echo "================================================="
cd /home/git/aq3
rake sshkeys:export
mv /tmp/authorized_keys /home/git/.ssh/
chown git /home/git/.ssh/authorized_keys
chmod 600 /home/git/.ssh/authorized_keys
rake git:pull
echo "================================================="
echo "== Ended: `date`"
echo "================================================="
echo
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment