Merge pull request #282 from truecharts/fixrestart

attempt 3
This commit is contained in:
Kjeld Schouten-Lebbing 2022-12-27 13:45:42 +01:00 committed by GitHub
commit 86a875b9d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@
patchv22120(){ patchv22120(){
echo "Applying 22.12 HotPatch 1" echo "Applying 22.12 HotPatch 1"
( wget -q -P /tmp https://github.com/truecharts/truetool/raw/main/hotpatch/2212/HP1.patch && echo "download completed" || echo "download failed" ) && ( patch -N -s -p0 -d /usr/lib/python3/dist-packages/middlewared/ &>/dev/null < /tmp/HP1.patch && echo "patch completed" && restartmiddleware=yes || echo "Patch Already Applied" ) && rm -rf /tmp/HP1.patch ( wget -q -P /tmp https://github.com/truecharts/truetool/raw/main/hotpatch/2212/HP1.patch && echo "download completed" || echo "download failed" ) && ( patch -N -s -p0 -d /usr/lib/python3/dist-packages/middlewared/ &>/dev/null < /tmp/HP1.patch && echo "patch completed" || echo "Patch Already Applied" ) && rm -rf /tmp/HP1.patch
echo "Applying 22.12 HotPatch 2" echo "Applying 22.12 HotPatch 2"
( wget -q -P /tmp https://github.com/truecharts/truetool/raw/main/hotpatch/2212/HP2.patch && echo "download completed" || echo "download failed" ) && ( patch -N -s -p0 -d /usr/lib/python3/dist-packages/middlewared/ &>/dev/null < /tmp/HP2.patch && echo "patch completed" && restartmiddleware=yes || echo "Patch Already Applied" ) && rm -rf /tmp/HP2.patch ( wget -q -P /tmp https://github.com/truecharts/truetool/raw/main/hotpatch/2212/HP2.patch && echo "download completed" || echo "download failed" ) && ( patch -N -s -p0 -d /usr/lib/python3/dist-packages/middlewared/ &>/dev/null < /tmp/HP2.patch && echo "patch completed" && restartmiddleware=yes || echo "Patch Already Applied" ) && rm -rf /tmp/HP2.patch
@ -22,7 +22,7 @@ else
echo "No hotpatch available for your version, congratulations!" echo "No hotpatch available for your version, congratulations!"
fi fi
if (( "$restartmiddleware" == "yes" )); then if [[ "$restartmiddleware" == "yes" ]]; then
middlewareRestart middlewareRestart
fi fi
restartmiddleware=no restartmiddleware=no