Files
i2p.www/site-updater-i2hq.sh
str4d 61f604c898 Define site-updater touch file in update vars
To use Apache mod_wsgi, change $TOUCHFILE to point to the WSGI
file, and set "WSGIScriptReloading On" in the Apache config.
2013-12-09 11:23:37 +00:00

20 lines
509 B
Bash
Executable File

#!/bin/sh
. ./etc/update.vars
TMP=$(mktemp XXXXXXXXXX)
trap 'rm -f $TMP;exit' 0 1 2 15
mtn pull "mtn://$MTNURL?$MTNBRANCH"
mtn up 2>&1 | tee $TMP
if grep "^mtn: \(add\|patch\|dropp\|updat\)\(ed\|ing\) 'i2p2www/translations/" "$TMP" >/dev/null ; then
echo "Translations updated, compiling messages"
./compile-messages-i2hq.sh
fi
if grep "^mtn: updating 'i2p2www/.*\.py\|^mtn: updating 'i2p2www/.*/.*\.py" "$TMP" >/dev/null ; then
echo "Python files changed, restarting server"
touch $TOUCHFILE
fi