refactor: peanut entrypoint (#10902)

* refactor: peanut entrypoint

* refactor: peanut: entrypoint fix

* Apply suggestion from @tremor021

* Apply suggestion from @tremor021

---------

Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
This commit is contained in:
Tobias
2026-01-18 15:18:51 +01:00
committed by GitHub
parent c03e532dde
commit 9dc1e606ec
2 changed files with 13 additions and 3 deletions
+10 -1
View File
@@ -28,7 +28,7 @@ function update_script() {
exit
fi
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
if check_for_gh_release "peanut" "Brandawg93/PeaNUT"; then
msg_info "Stopping Service"
@@ -37,6 +37,15 @@ function update_script() {
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "peanut" "Brandawg93/PeaNUT" "tarball" "latest" "/opt/peanut"
if ! grep -q '/opt/peanut/entrypoint.mjs' /etc/systemd/system/peanut.service; then
msg_info "Fixing entrypoint"
cd /opt/peanut
ln -sf .next/standalone/server.js server.js
sed -i 's|/opt/peanut/.next/standalone/server.js|/opt/peanut/entrypoint.mjs|' /etc/systemd/system/peanut.service
systemctl daemon-reload
msg_ok "Fixed entrypoint"
fi
msg_info "Updating Peanut"
cd /opt/peanut
$STD pnpm i