add script for install tg-bot on FBS1 new revision

This commit is contained in:
Ilia Korshunov 2025-06-15 18:06:40 +03:00
parent 2cffee981b
commit ddb279305a
3 changed files with 15 additions and 21 deletions

9
adds/kp.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
cd /home/gem
./tgBot.sh &
cd /home/gem/klipper
source /home/gem/printer_data/systemd/klipper.env
/home/gem/klippy-env/bin/python $KLIPPER_ARGS

View File

@ -1,21 +0,0 @@
#!/bin/bash
cd ~
tmux new-session -s my_session -d -c ~
tmux split-window -h -t my_session
tmux split-window -v -t my_session:0.0
tmux split-window -v -t my_session:0.1
tmux split-window -v -t my_session:0.2
tmux split-window -v -t my_session:0.3
tmux split-window -v -t my_session:0.4
tmux send-keys -t my_session:0.4 'sleep 2 && sudo ./kp.sh' C-m
tmux send-keys -t my_session:0.1 'sudo ./moon.sh' C-m
tmux send-keys -t my_session:0.2 'sudo nginx' C-m
tmux send-keys -t my_session:0.3 'sudo ./local_mcu.sh' C-m
tmux send-keys -t my_session:0.4 'sudo ./tgBot.sh' C-m
tmux attach-session -t my_session

View File

@ -11,4 +11,10 @@ cat /home/gem/moonraker-telegram-bot/scripts/requirements.txt | grep -v "uvloop"
/home/gem/moonraker-telegram-bot-env/bin/pip install --no-cache-dir -r /home/gem/space/requirements.txt
cp /home/gem/moonraker-telegram-bot/scripts/base_install_template /home/gem/printer_data/config/telegram-bot.cfg
chown gem:gem /home/gem/printer_data/config/telegram-bot.cfg
rm -rf ./space/
wget https://raw.githubusercontent.com/pjandro/fbS1Scripts/refs/heads/main/adds/tgBot.sh
chmod +x ./tgBot.sh
cp ./kp.sh kp.sh_back
wget https://raw.githubusercontent.com/pjandro/fbS1Scripts/refs/heads/main/adds/kp.sh
chmod +x ./kp.sh
EOF