Compare commits
2 Commits
5628382a5d
...
538fd345f9
| Author | SHA1 | Date | |
|---|---|---|---|
|
538fd345f9
|
|||
|
01ed78613c
|
8
fsfe-build.php
Normal file
8
fsfe-build.php
Normal 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
22
fsfe-build.sh
Executable 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"
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user