From 4e5b6790d12bb7acb9ca3dbe6b3c471cd0174370 Mon Sep 17 00:00:00 2001 From: str4d <str4d@mail.i2p> Date: Wed, 14 Aug 2013 22:18:06 +0000 Subject: [PATCH] Added site updater --- site-updater.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 site-updater.sh diff --git a/site-updater.sh b/site-updater.sh new file mode 100755 index 000000000..85ae10676 --- /dev/null +++ b/site-updater.sh @@ -0,0 +1,18 @@ +#!/bin/sh +TMP=tmp + +mtn update 2>&1 | tee $TMP + +cat $TMP | grep "^mtn: updating 'i2p2www/translations/" >/dev/null +if [ $? -eq 0 ]; then + echo "Translations updated, compiling messages" + ./compile-messages.sh +fi + +cat $TMP | grep "^mtn: updating 'i2p2www/.*/.*\.py" >/dev/null +if [ $? -eq 0 ]; then + echo "Python files changed, restarting server" + supervisorctl restart mainsite +fi + +rm $TMP -- GitLab