Skip to content

Commit 0034229

Browse files
authored
upgrade old Scriptcalls to new tools.func calls (#5242)
* Upgraded Function Names related to #5241 * change gh calls * add 2 missing
1 parent c116365 commit 0034229

File tree

116 files changed

+185
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+185
-190
lines changed

ct/2fauth.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function update_script() {
2929
exit
3030
fi
3131
RELEASE=$(curl -fsSL https://api.github.com/repos/Bubka/2FAuth/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
32-
if [[ "${RELEASE}" != "$(cat /opt/2fauth_version.txt)" ]] || [[ ! -f /opt/2fauth_version.txt ]]; then
32+
if [[ "${RELEASE}" != "$(cat ~/.2fauth 2>/dev/null || cat /opt/2fauth_version.txt 2>/dev/null)" ]]; then
3333
msg_info "Updating $APP to ${RELEASE}"
3434
$STD apt-get update
3535
$STD apt-get -y upgrade
@@ -45,10 +45,10 @@ function update_script() {
4545
$STD apt-get install -y \
4646
lsb-release \
4747
gnupg2
48-
PHP_VERSION="8.3" PHP_MODULE="common,ctype,fileinfo,fpm,mysql,cli" install_php
48+
PHP_VERSION="8.3" PHP_MODULE="common,ctype,fileinfo,fpm,mysql,cli" setup_php
4949
sed -i 's/php8.2/php8.3/g' /etc/nginx/conf.d/2fauth.conf
5050
fi
51-
fetch_and_deploy_gh_release "Bubka/2FAuth"
51+
fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth"
5252
mv "/opt/2fauth-backup/.env" "/opt/2fauth/.env"
5353
mv "/opt/2fauth-backup/storage" "/opt/2fauth/storage"
5454
cd "/opt/2fauth" || return

ct/actualbudget.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function update_script() {
2929
exit
3030
fi
3131
NODE_VERSION="22"
32-
install_node_and_modules
32+
setup_nodejs
3333
RELEASE=$(curl -fsSL https://api.github.com/repos/actualbudget/actual/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
3434
if [[ -f /opt/actualbudget-data/config.json ]]; then
3535
if [[ ! -f /opt/actualbudget_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/actualbudget_version.txt)" ]]; then

ct/configarr.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function update_script() {
2828
exit
2929
fi
3030
RELEASE=$(curl -fsSL https://api.github.com/repos/raydak-labs/configarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
31-
if [[ "${RELEASE}" != "$(cat /opt/configarr_version.txt)" ]] || [[ ! -f /opt/configarr_version.txt ]]; then
31+
if [[ "${RELEASE}" != "$(cat ~/.configarr 2>/dev/null || cat /opt/configarr_version.txt 2>/dev/null)" ]]; then
3232
msg_info "Stopping $APP"
3333
systemctl stop configarr-task.timer
3434
msg_ok "Stopped $APP"
@@ -37,7 +37,7 @@ function update_script() {
3737
mkdir -p /opt/backup/
3838
mv /opt/configarr/{config.yml,secrets.yml,.env} "/opt/backup/"
3939
rm -rf /opt/configarr
40-
fetch_and_deploy_gh_release "raydak-labs/configarr"
40+
fetch_and_deploy_gh_release "configarr" "raydak-labs/configarr"
4141
mv /opt/backup/* /opt/configarr/
4242
cd /opt/configarr
4343
$STD pnpm install

ct/fumadocs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function update_script() {
3434
exit 1
3535
fi
3636

37-
NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules
37+
NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs
3838
PROJECT_NAME=$(</opt/fumadocs/.projectname)
3939
PROJECT_DIR="/opt/fumadocs/${PROJECT_NAME}"
4040
SERVICE_NAME="fumadocs_${PROJECT_NAME}.service"

ct/gitea-mirror.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function update_script() {
2929
exit
3030
fi
3131
RELEASE=$(curl -fsSL https://api.github.com/repos/arunavo4/gitea-mirror/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
32-
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
32+
if [[ "${RELEASE}" != "$(cat ~/.${APP} 2>/dev/null || cat /opt/${APP}_version.txt 2>/dev/null)" ]]; then
3333

3434
msg_info "Stopping Services"
3535
systemctl stop gitea-mirror
@@ -48,15 +48,15 @@ function update_script() {
4848
msg_ok "Installed Bun"
4949

5050
rm -rf /opt/gitea-mirror
51-
fetch_and_deploy_gh_release "arunavo4/gitea-mirror"
52-
53-
msg_info "Updating and rebuilding ${APP} to v${RELEASE}"
51+
fetch_and_deploy_gh_release "gitea-mirror" "arunavo4/gitea-mirror"
52+
53+
msg_info "Updating and rebuilding ${APP} to v${RELEASE}"
5454
cd /opt/gitea-mirror
5555
$STD bun run setup
5656
$STD bun run build
5757
APP_VERSION=$(grep -o '"version": *"[^"]*"' package.json | cut -d'"' -f4)
5858
sudo sed -i.bak "s|^Environment=npm_package_version=.*|Environment=npm_package_version=${APP_VERSION}|" /etc/systemd/system/gitea-mirror.service
59-
msg_ok "Updated and rebuilt ${APP} to v${RELEASE}"
59+
msg_ok "Updated and rebuilt ${APP} to v${RELEASE}"
6060

6161
msg_info "Restoring Data"
6262
cp /opt/gitea-mirror-backup/data/* /opt/gitea-mirror/data

ct/homarr.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ EOF
8181
systemctl daemon-reload
8282
fi
8383
RELEASE=$(curl -fsSL https://api.github.com/repos/homarr-labs/homarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
84-
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
84+
if [[ "${RELEASE}" != "$(cat ~/.${APP} 2>/dev/null || cat /opt/${APP}_version.txt 2>/dev/null)" ]]; then
8585

8686
msg_info "Stopping Services (Patience)"
8787
systemctl stop homarr
@@ -100,10 +100,10 @@ EOF
100100
$STD command -v jq || $STD apt-get update && $STD apt-get install -y jq
101101
NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]')
102102
NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.packageManager | split("@")[1]')"
103-
install_node_and_modules
104-
103+
setup_nodejs
104+
105105
rm -rf /opt/homarr
106-
fetch_and_deploy_gh_release "homarr-labs/homarr"
106+
fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr"
107107

108108
msg_info "Updating and rebuilding ${APP} to v${RELEASE} (Patience)"
109109
rm /opt/run_homarr.sh

ct/jellyseerr.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ function update_script() {
5353

5454
if [ -z "$pnpm_current" ]; then
5555
msg_error "pnpm not found. Installing version $pnpm_desired..."
56-
NODE_VERSION="22" NODE_MODULE="pnpm@$pnpm_desired" install_node_and_modules
56+
NODE_VERSION="22" NODE_MODULE="pnpm@$pnpm_desired" setup_nodejs
5757
elif ! node -e "const semver = require('semver'); process.exit(semver.satisfies('$pnpm_current', '$pnpm_desired') ? 0 : 1)"; then
5858
msg_error "Updating pnpm from version $pnpm_current to $pnpm_desired..."
59-
NODE_VERSION="22" NODE_MODULE="pnpm@$pnpm_desired" install_node_and_modules
59+
NODE_VERSION="22" NODE_MODULE="pnpm@$pnpm_desired" setup_nodejs
6060
else
6161
msg_ok "pnpm is already installed and satisfies version $pnpm_desired."
6262
fi

ct/linkwarden.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ function update_script() {
2828
fi
2929
RELEASE=$(curl -fsSL https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
3030
if [[ "${RELEASE}" != "$(cat /opt/linkwarden_version.txt)" ]] || [[ ! -f /opt/linkwarden_version.txt ]]; then
31-
NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules
31+
NODE_VERSION="22" NODE_MODULE="yarn@latest" setup_nodejs
3232
msg_info "Stopping ${APP}"
3333
systemctl stop linkwarden
3434
msg_ok "Stopped ${APP}"
3535

36-
RUST_CRATES="monolith" install_rust_and_crates
36+
RUST_CRATES="monolith" setup_rust
3737

3838
msg_info "Updating ${APP} to ${RELEASE}"
3939
mv /opt/linkwarden/.env /opt/.env
4040
rm -rf /opt/linkwarden
41-
fetch_and_deploy_gh_release "linkwarden/linkwarden"
41+
fetch_and_deploy_gh_release "linkwarden" "linkwarden/linkwarden"
4242
cd /opt/linkwarden
4343
$STD yarn
4444
$STD npx playwright install-deps

ct/matterbridge.sh

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,17 @@ color
2020
catch_errors
2121

2222
function update_script() {
23-
header_info
24-
check_container_storage
25-
check_container_resources
26-
if [[ ! -d /root/Matterbridge ]]; then
27-
msg_error "No ${APP} Installation Found!"
28-
exit
29-
fi
30-
$STD apt-get update
31-
$STD apt-get upgrade -y
32-
NODE_VERSION="22"
33-
NODE_MODULE="matterbridge"
34-
install_node_and_modules
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d /root/Matterbridge ]]; then
27+
msg_error "No ${APP} Installation Found!"
3528
exit
29+
fi
30+
$STD apt-get update
31+
$STD apt-get upgrade -y
32+
NODE_VERSION="22" NODE_MODULE="matterbridge" setup_nodejs
33+
exit
3634
}
3735

3836
start

ct/seelf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function update_script() {
2828
msg_error "No ${APP} Installation Found!"
2929
exit
3030
fi
31-
if fetch_and_deploy_gh_release "YuukanOO/seelf"; then
31+
if fetch_and_deploy_gh_release "seelf" "YuukanOO/seelf"; then
3232
msg_ok "$APP already at the latest version. No update required."
3333
else
3434
msg_info "Stopping $APP"

0 commit comments

Comments
 (0)