install.sh still installed Node 20 (dropped in #152), ran the Debian-only
NodeSource script on yum systems, and hard-coded /usr/bin/node. The
README only mentioned install.sh, not setup.sh.
install.sh now:
- installs Node 22 LTS from the right NodeSource repo per distro and
checks the same 22.12+/24+ floor as setup.sh
- delegates npm install, mirror detection, native-binary checks and the
build to setup.sh, so the two scripts share one install path
- stops the service and replaces dist/node_modules on re-install (data/
is kept), copies bin/ (yt-dlp), and uses the real node path in the unit
README explains the difference between the two scripts and when to use
which. setup.sh's "Node.js not found" message no longer says 20+.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The script previously checked for a dist/ directory and failed with
"Please run this script from the TSMusicBot source directory after
building" — requiring users to manually build before installing.
Now the script:
- Resolves project root from script location (works from any cwd)
- Installs build tools (build-essential/gcc) for native modules
- Runs npm install + npm run build automatically
- Copies built artifacts to /opt/tsmusicbot
- Creates data directory for runtime files
- Adds journalctl command to the help output
https://claude.ai/code/session_016WhH58avUD9xy2dgADJgTh