auto restart sysupgrade after self update

pull/279/head
cronyx 2022-07-27 00:08:24 +03:00
parent 14e7dc6ebc
commit d944a2c130
1 changed files with 3 additions and 2 deletions

View File

@ -120,8 +120,9 @@ self_update() {
if ! [ "${scr_version}" = "${dstv}" ]; then
echo "A new version is available, trying to update..."
mv /tmp/sysupgrade /usr/sbin/ ; chmod +x /usr/sbin/sysupgrade
echo "Done. Try running sysupgrade again."
exit 0
echo "Done. Restarting..."
exec "$0" ${args}
exit 1
else
echo "Ok, version match."
fi