-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
46 lines (36 loc) · 1.05 KB
/
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
#!/usr/bin/env bash
echo "Installing requirements..."
pip3 install -r requirements.txt --user
echo "Installing audio playback requirements..."
apt install libops0 -y
apt install ffmpeg -y
# credential setup
echo "Creating credentials file ..."
touch credentials.py
echo 'Done!'
# Token setup
read -p "What is your discord token?: " discord_token
read -p "What is your Weather token?(if none hit return): " weather_token
echo "TOKEN='discord_token'" >> credentials.py
echo "WEATHER='weather_token'" >> credentials.py
echo "Set up is done."
## option for start or exit
PS3='Do you want to start your bot now?(1/2): '
options=("Yes" "No")
select opt in "${options[@]}"
do
case $opt in
"Yes")
echo "Creating Service..."
cp pybot.service /etc/systemd/system/
echo "Setting up Service..."
sudo systemctl daemon-reload
echo "Bot Started..."
sudo systemctl start pybot
;;
"No")
echo "Exiting Setup..."
break
;;
esac
done