2022-01-14 10:21:35 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -eu
|
2022-01-14 12:18:47 +00:00
|
|
|
echo ""
|
|
|
|
echo ""
|
2022-01-14 12:12:03 +00:00
|
|
|
echo -e "\033[1mTrueCharts HotPatcher for TrueNAS SCALE RC2\033[0m"
|
2022-01-14 11:55:16 +00:00
|
|
|
echo "This tool is going to patch your system to fix performance of the Apps interface..."
|
|
|
|
echo ""
|
2022-01-14 12:07:21 +00:00
|
|
|
sleep 5
|
2022-01-14 11:55:16 +00:00
|
|
|
echo "---"
|
2022-01-14 12:12:03 +00:00
|
|
|
echo -e "\033[1mApplying HotPatch 1\033[0m"
|
|
|
|
( 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 > /dev/null && echo "patch completed" || echo "patch failed" ) && rm -rf /tmp/RC2-HP1.deb
|
2022-01-14 11:55:16 +00:00
|
|
|
echo ""
|
2022-01-14 12:07:21 +00:00
|
|
|
sleep 5
|
2022-01-14 11:55:16 +00:00
|
|
|
echo "---"
|
2022-01-14 12:12:03 +00:00
|
|
|
echo -e "\033[1mApplying HotPatch 2\033[0m"
|
2022-01-14 12:18:47 +00:00
|
|
|
( 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 > /dev/null && echo "patch completed" || echo "patch failed, did you install it previously already?" ) && rm -rf /tmp/RC2-HP2.patch
|
2022-01-14 11:49:12 +00:00
|
|
|
|
|
|
|
echo "Restarting Middleware..." && systemctl restart middlewared
|
2022-01-14 12:07:21 +00:00
|
|
|
sleep 10
|
|
|
|
echo "Patching completed successfully."
|