#!/bin/bash if [ ! -e /hexo ]; then if [ -n "$REPOSITORY" ]; then cd /; git clone -b $BRANCH $REPOSITORY hexo; fi fi hexo server --cwd /hexo -p 80 > /logs/hexo.log 2>&1 & while true; do cd /hexo; git pull > /dev/null 2>&1 ; sleep 5; done