23 lines
588 B
Bash
Executable file
23 lines
588 B
Bash
Executable file
set -e -v
|
|
|
|
cd ~/mnemo_cards_common
|
|
git pull origin master
|
|
dart pub get
|
|
|
|
cd ~/mnemo_cards_common_backend
|
|
git pull origin master
|
|
dart pub get
|
|
|
|
cd ~/mnemo_cards_telegram_bot
|
|
git pull origin master
|
|
dart pub get && dart compile exe bin/main.dart -o bot_build.exe
|
|
|
|
sudo systemctl stop mnemo_cards_telegram_bot && true
|
|
sleep 2
|
|
sudo chmod 777 mnemo_cards_telegram_bot.service
|
|
sudo cp mnemo_cards_telegram_bot.service /etc/systemd/system
|
|
sudo cp bot_build.exe bot.exe
|
|
rm bot_build.exe
|
|
sudo systemctl start mnemo_cards_telegram_bot
|
|
sleep 8
|
|
journalctl -u mnemo_cards_telegram_bot --since "1min ago"
|