Fix broken run-helper update syntax and run-helper not updating on restart (#2050)

* Fix broken syntax in update wait for loop

* Update run-helper after each restart, not only at first
This commit is contained in:
Ferenc Hammerl
2022-08-09 16:50:52 +02:00
committed by GitHub
parent 352f201c62
commit 694d73d43c
2 changed files with 3 additions and 3 deletions

View File

@@ -9,10 +9,10 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
cp -f "$DIR"/run-helper.sh.template "$DIR"/run-helper.sh
# run the helper process which keep the listener alive
while :;
do
cp -f "$DIR"/run-helper.sh.template "$DIR"/run-helper.sh
"$DIR"/run-helper.sh $*
returnCode=$?
if [[ $returnCode -eq 2 ]]; then