upgrade old Scriptcalls to new tools.func calls (#5242)

* Upgraded Function Names related to #5241

* change gh calls

* add 2 missing
This commit is contained in:
CanbiZ 2025-06-18 12:03:00 +02:00 committed by GitHub
parent c11636562c
commit 003422934a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
116 changed files with 185 additions and 190 deletions

View file

@ -29,7 +29,7 @@ function update_script() {
exit
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/Bubka/2FAuth/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ "${RELEASE}" != "$(cat /opt/2fauth_version.txt)" ]] || [[ ! -f /opt/2fauth_version.txt ]]; then
if [[ "${RELEASE}" != "$(cat ~/.2fauth 2>/dev/null || cat /opt/2fauth_version.txt 2>/dev/null)" ]]; then
msg_info "Updating $APP to ${RELEASE}"
$STD apt-get update
$STD apt-get -y upgrade
@ -45,10 +45,10 @@ function update_script() {
$STD apt-get install -y \
lsb-release \
gnupg2
PHP_VERSION="8.3" PHP_MODULE="common,ctype,fileinfo,fpm,mysql,cli" install_php
PHP_VERSION="8.3" PHP_MODULE="common,ctype,fileinfo,fpm,mysql,cli" setup_php
sed -i 's/php8.2/php8.3/g' /etc/nginx/conf.d/2fauth.conf
fi
fetch_and_deploy_gh_release "Bubka/2FAuth"
fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth"
mv "/opt/2fauth-backup/.env" "/opt/2fauth/.env"
mv "/opt/2fauth-backup/storage" "/opt/2fauth/storage"
cd "/opt/2fauth" || return