webbuild-cgi: small refining of rpmbuild processes detection

This commit is contained in:
Silvan Calarco 2015-05-16 14:28:02 +02:00
parent 90a0d85269
commit 5f2e54f58a

View File

@ -396,7 +396,7 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then
# echo -n "<div align=left class=processes>"
u="$(uptime)"
f="$(df / -k -h --output=avail,pcent|tail -n1)"
b=`ps ax|grep rpmbuild|grep spec|while read l; do basename "${l/.spec}"; done`
b=`ps ax|grep "rpmbuild .*\.spec$"|while read l; do basename "${l/.spec}"; done`
echo -n "Load: <b>${u/*: }</b> | Disk: <b>$f</b> | Now building: <b>$b</b> | "
if [ "$STATE_JOBSSHOWALL" != "1" ]; then
echo "My jobs: [<a href=# onclick=ajax_getvalues(\"REQUEST=refreshjobs&JOBSSHOWALL=true\");>Show all jobs</a>]"