This repository has been archived on 2022-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
KassouBot/start.sh

23 lines
574 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
2021-08-14 16:11:17 +02:00
cd src/lavalink
2021-08-14 18:52:41 +02:00
if [ -f "Lavalink.jar" ]; then
echo "Lavalink found."
else {
2021-08-15 18:01:24 +02:00
echo "Downloading Lavalink ...";
2021-08-14 18:52:41 +02:00
chmod u+x download.sh;
./download.sh
} fi
if pgrep -f "Lavalink.jar" > /dev/null
then
echo "Lavaling already started."
else {
2021-08-15 18:01:24 +02:00
echo "Starting Lavalink server ...";
2021-08-14 19:00:07 +02:00
java -Djdk.tls.client.protocols=TLSv1.3 -Xmx3G -jar Lavalink.jar 1> /dev/null & # showing only stderror
2021-08-14 18:52:41 +02:00
} fi
2021-08-14 15:08:00 +02:00
cd ..
2021-08-15 18:01:24 +02:00
echo "Starting Discord bot ..."
python3 -u ./main.py
2021-08-14 15:11:34 +02:00
2021-08-14 18:52:41 +02:00
# if you want to kill the java process, do this command:
# pkill -9 -f Lavalink.jar