forked from Study-Together-Org/time_counter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathubuntu_setup.sh
31 lines (25 loc) · 890 Bytes
/
ubuntu_setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
sudo apt update
sudo apt-get install python3.8-venv python3.8-dev
python3.8 -m venv venv
source venv/bin/activate
sudo apt install mariadb-server
sudo mysql_secure_installation # manual choices needed
# https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost/42742610#42742610
sudo systemctl enable --now mysql
# to test: mysql -u root -p
sudo apt install redis-server
sudo systemctl enable redis-server
# to test: redis-cli
# manual: create a database called studytogether
# manual: set up dev.env config (create bot etc)
python models.py
python create_roles.py
python get_monitored_categories.py
python insert_real_data.py # optional
touch discord.log
touch heartbeat.log
nohup python controller_time_counter.py > console.log 2>&1 &
# to check: ps -ef | egrep "main_study|PID"
tail -F discord.log
# wait for login log to show