#!/bin/sh
pelican -r /srv/pelican/content -o /srv/pelican/output/ -s pelicanconf.py

#!/bin/sh

# Alternative to "pelican -r"'s polling: use inotify
while true; do
    pelican /srv/pelican/content -o /srv/pelican/output/ -s pelicanconf.py
    inotifywait -qqr --exclude "\#.*|.*~" -e close_write,move,delete,create /srv/pelican/content /srv/pelican/config
    sleep 3
    echo "Rerunning pelican on `date`"
done

Use inotifywait to refresh instead of pelican -r, to save CPU
Use inotifywait to refresh instead of pelican -r, to save CPU
