Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-master-status
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-11-25 16:46:56 +0100
committerErich Eckner <git@eckner.net>2017-11-25 16:46:56 +0100
commitf894f608f78b6d6e47c7d185ba9a33c160ac2f4b (patch)
treee0e1fbf936be61159f980dbea89fb01d96cc3cf1 /bin/build-master-status
parent683dbec99baa2fd02e732815cd1cf481bc31921d (diff)
bin/build-master-status: make nice ssh-log for website
Diffstat (limited to 'bin/build-master-status')
-rwxr-xr-xbin/build-master-status34
1 files changed, 34 insertions, 0 deletions
diff --git a/bin/build-master-status b/bin/build-master-status
index c453427..bf307b4 100755
--- a/bin/build-master-status
+++ b/bin/build-master-status
@@ -545,6 +545,40 @@ if ${web}; then
} > \
"${tmp_dir}/blacklist.html"
+ {
+ printf '%s\n' \
+ '<html>' \
+ '<head>' \
+ '<title>log of ssh connections from build slaves</title>' \
+ '</head>' \
+ '<body>' \
+ '<table>'
+ printf '<tr>'
+ printf '<th>%s</th>' \
+ 'time' \
+ 'build slave' \
+ 'command' \
+ 'arguments'
+ printf '</tr>\n'
+ if [ -r "${work_dir}/ssh-log" ]; then
+ while read -r date time slave command arguments; do
+ printf '<tr>'
+ printf '<td>%s</td>' \
+ "${date} ${time}" \
+ "${slave}" \
+ "${command}" \
+ "${arguments}"
+ printf '</tr>\n'
+ done < \
+ "${work_dir}/ssh-log"
+ fi
+ printf '%s\n' \
+ '</table>' \
+ '</body>' \
+ '</html>'
+ } > \
+ "${tmp_dir}/ssh-log.html"
+
find "${tmp_dir}" -maxdepth 1 -type f | \
while read -r file; do
cat "${file}" > \