1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +00:00

Merge pull request #3774 from holta/iiab-update2

`iiab-update -f` installs Calibre-Web's latest requirements.txt + mentions alternative `iiab-update` w/o flags
This commit is contained in:
A Holt 2024-07-19 07:16:21 -04:00 committed by GitHub
commit dbce29b24e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,7 +21,7 @@
echo -e "\n\n\e[44;1mAttempting a FAST upgrade of IIAB Calibre-Web...\e[0m\n"
echo -e "\n\e[33m'iiab-update -f' DOES NOT apply apt updates.\e[0m"
else
echo -e "\n\n\e[44;1mUpgrade IIAB core software: (apt updates, Ansible, Admin Console, etc)\e[0m\n"
echo -e "\n\n\e[44;1mUpgrading IIAB core software: (apt updates, Ansible, Admin Console, etc)\e[0m\n"
echo -e "\n\e[44;1mOr try 'iiab-update -f' for a FAST upgrade of IIAB Calibre-Web!\e[0m\n\n"
echo -e "\e[4mNow running: apt update\e[0m\n"
apt update
@ -45,16 +45,13 @@
fi
if [[ $1 == "-f" || $1 == "--fast" ]]; then
echo -e "\n\e[33m'iiab-update -f' DOES NOT upgrade Ansible.\e[0m\n"
echo -e "\n\e[33m'iiab-update -f' DOES NOT upgrade Ansible.\e[0m\n\n"
else
echo -e "\n\n\e[4mNow running: scripts/ansible\e[0m"
scripts/ansible
fi
if grep -q 'calibreweb_installed: True' /etc/iiab/iiab_state.yml; then
if [[ $1 == "-f" || $1 == "--fast" ]]; then
echo -e "\n\e[1mIf you want a COMPLETE reinstall of Calibre-Web, then also run:\n\n\e[0m\e[7mcd /opt/iiab/iiab ; ./runrole --reinstall calibre-web\e[0m\n"
fi
echo -e "\e[4mNow running: pipx uninstall xklb # THIS ALSO UNINSTALLS yt-dlp\e[0m\n"
pipx uninstall xklb
echo -e "\n\e[4mNow running: pipx install xklb # THIS ALSO INSTALLS yt-dlp\e[0m\n"
@ -72,11 +69,13 @@
systemctl stop calibre-web
echo -e "\e[4mNow running: git pull https://github.com/iiab/calibre-web --no-rebase --no-edit\e[0m\n"
git pull https://github.com/iiab/calibre-web --no-rebase --no-edit
cd /opt/iiab/iiab
if [[ $1 == "-f" || $1 == "--fast" ]]; then
echo -e "\n\e[4mNow running: systemctl restart calibre-web\e[0m\n"
echo -e "\n\e[4mNow running: bin/pip install -r requirements.txt --prefer-binary\e[0m\n"
bin/pip install -r requirements.txt --prefer-binary > /dev/null
echo -e "\e[4mNow running: systemctl restart calibre-web\e[0m\n"
systemctl restart calibre-web
else
cd /opt/iiab/iiab
echo -e "\n\e[4mNow running: ./runrole --reinstall calibre-web\e[0m\n"
./runrole --reinstall calibre-web
fi
@ -124,7 +123,12 @@
fi
fi
echo -e "\n\n\e[44;1miiab-update COMPLETE!\e[0m\n\n"
if [[ $1 == "-f" || $1 == "--fast" ]]; then
echo -e "\n\n\e[44;1m'iiab-update -f' COMPLETE!\e[0m\n"
echo -e "\e[44;1mIf Calibre-Web fails, please try 'iiab-update' WITHOUT '-f'\e[0m\n\n" # \e[7m == reverse video (e.g. black on white)
else
echo -e "\n\n\e[44;1miiab-update COMPLETE!\e[0m\n\n"
fi
exit # https://stackoverflow.com/questions/2285403/how-to-make-shell-scripts-robust-to-source-being-changed-as-they-run
}