webbuild-cgi: add log message for invalid secret; added a check for /var/autoport existence
This commit is contained in:
parent
2ed572f76b
commit
a292621b9c
@ -56,6 +56,9 @@ if [ "$USER" ]; then
|
|||||||
USER_ENABLED=
|
USER_ENABLED=
|
||||||
fi
|
fi
|
||||||
elif [ "${REQUEST:0:7}" != "refresh" ]; then
|
elif [ "${REQUEST:0:7}" != "refresh" ]; then
|
||||||
|
if [ "$SECRET" ]; then
|
||||||
|
echo "webbuild: invalid credentials: REQUEST=${REQUEST} USER=${USER} SECRET=${SECRET}" >&2
|
||||||
|
fi
|
||||||
# no "$USER_SECRET" set; require password
|
# no "$USER_SECRET" set; require password
|
||||||
echo -n "<output><![CDATA[Please enter your password: <input type=password id=password "
|
echo -n "<output><![CDATA[Please enter your password: <input type=password id=password "
|
||||||
echo -n "onkeypress=if(checkEnter(event))"
|
echo -n "onkeypress=if(checkEnter(event))"
|
||||||
@ -370,7 +373,7 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then
|
|||||||
# echo -n "<div align=left class=processes>"
|
# echo -n "<div align=left class=processes>"
|
||||||
u="$(uptime)"
|
u="$(uptime)"
|
||||||
f="$(df / -k -h --output=avail,pcent|tail -n1)"
|
f="$(df / -k -h --output=avail,pcent|tail -n1)"
|
||||||
fap="$(df /var/autoport/* -k -h --output=avail,pcent|tail -n+2)"
|
[ -z "/var/autoport" ] && fap="$(df /var/autoport/* -k -h --output=avail,pcent|tail -n+2)"
|
||||||
[ "$fap" ] && f="$f | ${fap/$'\n'/ | }"
|
[ "$fap" ] && f="$f | ${fap/$'\n'/ | }"
|
||||||
b=`ps ax|grep "rpmbuild .*\.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> | "
|
echo -n "Load: <b>${u/*: }</b> | Disk: <b>$f</b> | "
|
||||||
|
Loading…
Reference in New Issue
Block a user