Files
conjurer/install_main_bot.sh
T
Michal Tuszowski a64fb2da57 Restructure: promote working_copy to repo root
Make the stable 'working copy' bot the canonical code at the repository
root so the install/deploy scripts operate against it again.

- Move working_copy/* to root (bot entrypoint is bot.py)
- Restore root-level install/ops scripts from c4fa88e (deploy.sh,
  install_main_bot.sh, status_report.*, conjurer.service, etc.)
- Fix deploy.sh: copy bot.py (was thin_client.py) and add the
  conanjurer_* modules; bump command count
- Remove side-by-side variant dirs (backup_old_docker, prototype_one,
  prototype_musician_one, musician_old, working_copy) and docker cruft
- Keep components as subdirs: conjurer_librarian, conjurer_musician,
  spotify_dl, yt_dlp, fonts, utils, docs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 23:50:55 +02:00

26 lines
1.2 KiB
Bash

#!/bin/bash
sudo apt-get install python3-dev
sudo apt-get install portaudio19-dev python3-pyaudio
sudo apt-get install
cd /home/pi || exit
mdkir Conjurer
cd Conjurer ||exit
python3 -m venv /home/pi/Conjurer/.env
cp /home/pi/conjurer/requirements_bot.txt /home/pi/Conjurer/
# trunk-ignore(shellcheck/SC1091)
source /home/pi/Conjurer/.env/bin/activate
./.env/bin/python3 -m pip install --upgrade pip
./.env/bin/python3 -m pip install -r requirements_bot.txt
sed -i -e 's/os.rename/shutil.copy/g' ./.env/lib/python3.11/site-packages/spotify_dl/youtube.py
sed -i '1i\import shutil' ./.env/lib/python3.11/site-packages/spotify_dl/youtube.py
sed -i '1i\import logging' ./.env/lib/python3.11/site-packages/spotify_dl/spotify.py
sed -i '21i\ logger = logging.getLogger("discord")' ./.env/lib/python3.11/site-packages/spotify_dl/spotify.py
sed -i '22i\ logger.info("Playlist")' ./.env/lib/python3.11/site-packages/spotify_dl/spotify.py
#add sed changing signal registration to catch exception in spotify dl init
deactivate
sudo cp ./conjurer.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl start conjurer.service
sudo systemctl enable conjurer.service