Skip to content

Commit ec573be

Browse files
authored
Update homarr.sh (#4974)
1 parent 4e53abb commit ec573be

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

ct/homarr.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,19 @@ EOF
9292
cp /opt/homarr/.env /opt/homarr-data-backup/.env
9393
msg_ok "Backup Data"
9494

95+
msg_info "Updating Nodejs"
96+
$STD apt update
97+
$STD apt upgrade nodejs -y
98+
msg_ok "Updated Nodejs"
99+
100+
$STD command -v jq || $STD apt-get update && $STD apt-get install -y jq
101+
NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]')
102+
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+
105+
rm -rf /opt/homarr
106+
fetch_and_deploy_gh_release "homarr-labs/homarr"
107+
95108
msg_info "Updating and rebuilding ${APP} to v${RELEASE} (Patience)"
96109
rm /opt/run_homarr.sh
97110
cat <<'EOF' >/opt/run_homarr.sh
@@ -117,12 +130,6 @@ node apps/nextjs/server.js & PID=$!
117130
wait $PID
118131
EOF
119132
chmod +x /opt/run_homarr.sh
120-
$STD command -v jq || $STD apt-get update && $STD apt-get install -y jq
121-
NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]')
122-
NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.packageManager | split("@")[1]')"
123-
install_node_and_modules
124-
rm -rf /opt/homarr
125-
fetch_and_deploy_gh_release "homarr-labs/homarr"
126133
mv /opt/homarr-data-backup/.env /opt/homarr/.env
127134
cd /opt/homarr
128135
$STD pnpm install --recursive --frozen-lockfile --shamefully-hoist

0 commit comments

Comments
 (0)