summaryrefslogtreecommitdiffstats
path: root/retiolum/scripts/github_listener/handle_request
diff options
context:
space:
mode:
Diffstat (limited to 'retiolum/scripts/github_listener/handle_request')
-rwxr-xr-xretiolum/scripts/github_listener/handle_request19
1 files changed, 13 insertions, 6 deletions
diff --git a/retiolum/scripts/github_listener/handle_request b/retiolum/scripts/github_listener/handle_request
index 2df05ae0..5b42524a 100755
--- a/retiolum/scripts/github_listener/handle_request
+++ b/retiolum/scripts/github_listener/handle_request
@@ -3,14 +3,21 @@
# WEBDIR
# HOSTFOLDER
set -euf
-HOSTFOLDER=${HOSTFOLDER:-../../hosts}
+if [ "x${2:-}" = x ];then
+ echo "usage: $0 HOSTDIRECTORY WEBDIRECTORY"
+ exit 1
+fi
+export HOSTDIR=${1:-../../hosts}
+WEBDIR=${2:-/var/www/euer.krebsco.de/retiolum/}
+echo "sorry for keeping you waiting, please be patient"
+
cd $(dirname $(readlink -f $0))
-cd "$HOSTFOLDER"
+
+cd "$HOSTDIR"
git pull origin master >&2
+echo "First step done"
cd - >&2
-
-echo "sorry for keeping you waiting, please be patient"
-../../bin/create-supernode-tar
+../../bin/create-supernode-tar $WEBDIR
echo "almost done..."
-../../bin/create-host-tar
+../../bin/create-host-tar $WEBDIR
echo "Thank you for your patience!"