Files
conjurer/install_main_bot.sh
T
gitea b8df466e6f Tag: 1.16
Intermediate commits (oldest → newest):
- moving api key to netrc
- New stuff incoming
- Manual external audition
- Let's get this effin party started
- test mic
- tst
- Test
- Test
- fix
- fx
- test
- Refactoring step one
- Deploy script for after refactor
- Fix and upgrade
- bg fx
- fx
- fx
- fx
- Main refactoring
- Deploy script refactor
- fx
- fx2
- bgfx
2025-10-30 16:59:12 +01:00

24 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
sudo apt-get install python3-dev
cd /home/pi || exit
mdkir Conjurer
cd Conjurer ||exit
python3 -m venv /home/pi/Conjurer/.venv
cp /home/pi/conjurer/requirements_bot.txt /home/pi/Conjurer/
# trunk-ignore(shellcheck/SC1091)
source /home/pi/Conjurer/.venv/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