-
Notifications
You must be signed in to change notification settings - Fork 0
/
apt_install.sh
54 lines (39 loc) · 1.43 KB
/
apt_install.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
# This script is used to install the package and its dependencies
# Update system
echo "Updating system"
sudo apt-get update -y && sudo apt-get upgrade -y
echo "System updated"
echo "================================"
echo "================================"
echo "================================"
# Install the necessary packages for the bot
LIST="python3 python3-pip mariadb-server mariadb-client"
for i in $LIST; do
echo "Installing $i"
sudo apt install "$i" -y
echo "$i installed"
echo "================================"
done
echo "Packages installed"
echo "================================"
echo "================================"
echo "================================"
# Install the python dependencies
echo "Installing python dependencies"
python3 -m pip install -r requirements.txt
echo "Python dependencies installed"
echo "================================"
echo "================================"
echo "================================"
# Create the database
echo "Creating the database"
mysql -u root -p < FeurBot.sql
echo "Database created"
echo "================================"
echo "================================"
echo "================================"
echo "Installation complete"
echo "You now need to edit the private/config.py file to add your bot token and database credentials"
echo "You can run, after that, the bot with the command: python3 FeurBot.py"
echo "================================"