Skip to content

Commit 25fa1a3

Browse files
committed
Add script to update bot quickly
1 parent 2e945cd commit 25fa1a3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

scripts/update-running.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#! /usr/bin/env bash
2+
3+
BOT_SCRIPT="bot/TypoBot.py"
4+
VENV_SCRIPT="scripts/venv.sh"
5+
6+
# Fetch latest changes
7+
git pull
8+
9+
# Kill running process
10+
pkill -f "$BOT_SCRIPT"
11+
12+
# Run new (updated) instance
13+
source "$VENV_SCRIPT"
14+
nohup python3 "$BOT_SCRIPT" &

0 commit comments

Comments
 (0)