Add sudo to pm2 commands

This commit is contained in:
2026-09-02 21:30:18 +03:00
parent e52b3374e5
commit 43eee69248

View File

@@ -19,11 +19,11 @@ sudo bun run build
echo "Starting/reloading with pm2..."
if pm2 describe "$APP_NAME" > /dev/null 2>&1; then
pm2 reload "$APP_NAME" --update-env
sudo pm2 reload "$APP_NAME" --update-env
else
pm2 start bun --name "$APP_NAME" -- run start
sudo pm2 start bun --name "$APP_NAME" -- run start
fi
pm2 save
sudo pm2 save
echo "Deployment complete."