webbuild-cgi: fix getting processes pid with more than one '+' sign appended

This commit is contained in:
Silvan Calarco 2024-02-08 17:05:34 +01:00
parent 4d29a63a34
commit 5354160b25

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# webbuild cgi script
# Copyright (c) 2012-2023 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2012-2024 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
. /usr/share/autodist/webbuild-functions
. /usr/share/autodist/webbuild-functions-private
@ -400,7 +400,7 @@ if [ "$REQUEST" = "refresh" -o "$REQUEST" = "refreshjobs" ]; then
NOTIFIED=
if [ "${ORIGRETCODE: -1}" == "+" ]; then
NOTIFIED=1
RETCODE="${ORIGRETCODE::-1}"
RETCODE="${ORIGRETCODE/+*}"
else
RETCODE=$ORIGRETCODE
fi