Compare commits

...

2 Commits

Author SHA1 Message Date
538fd345f9 add php/sh scripts to show build status 2018-05-15 08:30:24 +02:00
01ed78613c clarify a few strings 2018-05-15 08:30:04 +02:00
3 changed files with 34 additions and 4 deletions

8
fsfe-build.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
$command = "/bin/bash fsfe-build.sh https://status.fsfe.org/fsfe.org";
// Execute command and give output
$output = shell_exec($command);
echo "$output";
?>

22
fsfe-build.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
WEB=$1
TMP=.status.tmp
wget -qO $TMP $WEB
STATUS=$(grep "Termination Status" $TMP | perl -pe "s/.*\<dd\>(.+)\<.*/\1/"
)
REV=$(grep "Updating " $TMP | grep -Eo "[[:alnum:]]{7}\.\.[[:alnum:]]{7}")
if [ "$STATUS" == "Success" ]; then
STATUS="fin"
elif [ "$STATUS" == "running..." ]; then
STATUS="run"
fi
if [ "$REV" = "" ]; then
REV="(uncond)"
fi
echo "$STATUS;r$REV"

View File

@@ -47,11 +47,11 @@ function check_svn {
SVN_REV=$(echo $STATUS | cut -d";" -f2)
fi
else
SVN="offline"
SVN_REV="offline"
SVN="off"
SVN_REV="off"
fi
OUT="$OUT;svn=$SVN"
TOOL="$TOOL;svn=$SVN_REV"
OUT="$OUT;web=$SVN"
TOOL="$TOOL;web=$SVN_REV"
}
# NAMESERVER STATUS