more silence and UX cleanup for pathcer

This commit is contained in:
kjeld Schouten-Lebbing
2022-01-14 13:07:21 +01:00
parent a2fb2674d3
commit e984b67877
+9 -5
View File
@@ -1,15 +1,19 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eu set -eu
echo "Welcome to the TrueCharts HotPatcher for TrueNAS SCALE RC2" echo -e "\033[1mTrueCharts HotPatcher for TrueNAS SCALE RC2"
echo "This tool is going to patch your system to fix performance of the Apps interface..." echo "This tool is going to patch your system to fix performance of the Apps interface..."
echo "" echo ""
sleep 5
echo "---" echo "---"
echo "Applying HotPatch 1" echo -e "\033[1mApplying HotPatch 1"
( wget -q -P /tmp https://github.com/truecharts/apps/raw/master/tools/RC2-HP1.deb && echo "download completed" || echo "download failed" ) && ( dpkg -i /tmp/RC2-HP1.deb 2> /dev/null && echo "patch completed" || echo "patch failed" ) && rm -rf /tmp/RC2-HP1.deb ( wget -q -P /tmp https://github.com/truecharts/apps/raw/master/tools/RC2-HP1.deb && echo "download completed" || echo "download failed" ) && ( dpkg -i /tmp/RC2-HP1.deb 2>&1 /dev/null && echo "patch completed" || echo "patch failed" ) && rm -rf /tmp/RC2-HP1.deb
echo "" echo ""
sleep 5
echo "---" echo "---"
echo "Applying HotPatch 2" echo -e "\033[1mApplying HotPatch 2"
( wget -q -P /tmp https://github.com/truecharts/apps/raw/master/tools/RC2-HP2.patch && echo "download completed" || echo "download failed" ) && ( patch -N -s -p0 -d /usr/lib/python3/dist-packages/middlewared/ < /tmp/RC2-HP2.patch && echo "patch completed" || echo "patch failed" ) && rm -rf /tmp/RC2-HP2.patch ( wget -q -P /tmp https://github.com/truecharts/apps/raw/master/tools/RC2-HP2.patch && echo "download completed" || echo "download failed" ) && ( patch -N -s -p0 -d /usr/lib/python3/dist-packages/middlewared/ < /tmp/RC2-HP2.patch 2>&1 /dev/null && echo "patch completed" || echo "patch failed" ) && rm -rf /tmp/RC2-HP2.patch
echo "Restarting Middleware..." && systemctl restart middlewared echo "Restarting Middleware..." && systemctl restart middlewared
sleep 10
echo "Patching completed successfully."