kameronkenny.com/entrypoint.sh

21 lines
296 B
Bash

#!/usr/bin/env bash
function start_nginx() {
/usr/sbin/nginx -p /usr/local/jekyll -c nginx.conf
}
function watchtower() {
while true; do
ps -elf | grep nginx | grep -v grep | grep nginx >/dev/null 2>&1
RC=$?
if [[ $RC != 0 ]]; then
start_nginx
fi
sleep 10
done
}
watchtower