Update install.sh
This commit is contained in:
parent
3b23002128
commit
6d8bf5a997
1 changed files with 36 additions and 17 deletions
53
install.sh
53
install.sh
|
|
@ -3,6 +3,8 @@ set -e
|
||||||
echo -e "\e[32m
|
echo -e "\e[32m
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
# Lavalink Installation Script #
|
# Lavalink Installation Script #
|
||||||
|
# Created and maintained by Josh S. #
|
||||||
|
# Author Josh S. | https://joshsevero.dev #
|
||||||
# This Script only works on Ubuntu & Debian #
|
# This Script only works on Ubuntu & Debian #
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # #\e[0m"
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # #\e[0m"
|
||||||
|
|
||||||
|
|
@ -37,7 +39,7 @@ fi
|
||||||
# Install NodeJS
|
# Install NodeJS
|
||||||
if ! [ -x "$(command -v node)" ]; then
|
if ! [ -x "$(command -v node)" ]; then
|
||||||
echo -e "\e[32m* Installing NodeJS\e[0m"
|
echo -e "\e[32m* Installing NodeJS\e[0m"
|
||||||
echo -e "\e[32m* Which NodeJS version would you like to install? [17, 18.]\e[0m"
|
echo -e "\e[32m* Which NodeJS version would you like to install? []\e[0m"
|
||||||
read NodeJSVer
|
read NodeJSVer
|
||||||
if [[ -n "NodeJSVer" ]]
|
if [[ -n "NodeJSVer" ]]
|
||||||
then
|
then
|
||||||
|
|
@ -79,7 +81,8 @@ echo "What port do you want your Lavalink to run on?"
|
||||||
read Lava_Port
|
read Lava_Port
|
||||||
echo "What password do you want to set for your Lavalink?"
|
echo "What password do you want to set for your Lavalink?"
|
||||||
read Lava_Pass
|
read Lava_Pass
|
||||||
echo "server: # REST and WS server
|
echo "
|
||||||
|
server: # REST and WS server
|
||||||
port: $Lava_Port
|
port: $Lava_Port
|
||||||
address: 0.0.0.0
|
address: 0.0.0.0
|
||||||
|
|
||||||
|
|
@ -87,11 +90,11 @@ lavalink:
|
||||||
server:
|
server:
|
||||||
password: \"$Lava_Pass\"
|
password: \"$Lava_Pass\"
|
||||||
playerUpdateInterval: 5 # How frequently to send player updates to clients, in seconds
|
playerUpdateInterval: 5 # How frequently to send player updates to clients, in seconds
|
||||||
statsTaskInterval: 60 # How frequently to send the node stats to clients, in seconds
|
statsTaskInterval: 30 # How frequently to send the node stats to clients, in seconds
|
||||||
koe:
|
koe:
|
||||||
useEpoll: true
|
useEpoll: true
|
||||||
highPacketPriority: true
|
highPacketPriority: true
|
||||||
bufferDurationMs: 400
|
bufferDurationMs: 200
|
||||||
byteBufAllocator: "default"
|
byteBufAllocator: "default"
|
||||||
sources:
|
sources:
|
||||||
# Remote sources
|
# Remote sources
|
||||||
|
|
@ -112,15 +115,15 @@ lavalink:
|
||||||
lavaplayer:
|
lavaplayer:
|
||||||
nonAllocating: false # Whether to use the non-allocating frame buffer.
|
nonAllocating: false # Whether to use the non-allocating frame buffer.
|
||||||
frameBufferDuration: 5000 # The frame buffer duration, in milliseconds
|
frameBufferDuration: 5000 # The frame buffer duration, in milliseconds
|
||||||
youtubePlaylistLoadLimit: 6 # Number of pages at 100 each
|
youtubePlaylistLoadLimit: 60 # Number of pages at 100 each
|
||||||
gc-warnings: true
|
gc-warnings: true
|
||||||
youtubeSearchEnabled: true
|
youtubeSearchEnabled: true
|
||||||
odyseeSearchEnabled: true
|
odyseeSearchEnabled: true
|
||||||
soundcloudSearchEnabled: true
|
soundcloudSearchEnabled: true
|
||||||
yandexMusicSearchEnabled: true
|
yandexMusicSearchEnabled: true
|
||||||
#youtubeConfig: (Youtube account credentials, needed to play age restricted tracks)
|
#youtubeConfig:
|
||||||
#email: ""
|
# email: ""
|
||||||
#password: ""
|
# password: ""
|
||||||
# You can get your yandex oauth token here https://music-yandex-bot.ru/ used to remove the 30s limit on some tracks
|
# You can get your yandex oauth token here https://music-yandex-bot.ru/ used to remove the 30s limit on some tracks
|
||||||
#yandexOAuthToken:
|
#yandexOAuthToken:
|
||||||
#ratelimit:
|
#ratelimit:
|
||||||
|
|
@ -142,22 +145,38 @@ sentry:
|
||||||
# some_key: some_value
|
# some_key: some_value
|
||||||
# another_key: another_value
|
# another_key: another_value
|
||||||
|
|
||||||
logging:
|
#logging:
|
||||||
file:
|
# file:
|
||||||
path: ./logs/
|
# path: ./logs/
|
||||||
logback:
|
# logback:
|
||||||
rollingpolicy:
|
# rollingpolicy:
|
||||||
max-file-size: 1GB
|
# max-file-size: 1GB
|
||||||
max-history: 30
|
# max-history: 30
|
||||||
|
|
||||||
level:
|
level:
|
||||||
root: INFO
|
root: INFO
|
||||||
lavalink: INFO
|
lavalink: INFO
|
||||||
" > application.yml
|
" > application.yml
|
||||||
|
echo "
|
||||||
|
{
|
||||||
|
"apps":[
|
||||||
|
{
|
||||||
|
"name":"Lavalink",
|
||||||
|
"cwd":".",
|
||||||
|
"script":"/usr/bin/java",
|
||||||
|
"args":[
|
||||||
|
"-jar",
|
||||||
|
"/root/Lavalink/Lavalink.jar",
|
||||||
|
],
|
||||||
|
"exec_interpreter":"",
|
||||||
|
"exec_mode":"fork"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
" > config.json
|
||||||
echo -e "\e[32m* Lavalink Installation Completed\e[0m"
|
echo -e "\e[32m* Lavalink Installation Completed\e[0m"
|
||||||
|
|
||||||
# Start Lavalink
|
# Start Lavalink
|
||||||
sudo pm2 start Lavalink.jar --name "Lavalink"
|
sudo pm2 start ~/Lavalink/config.json Lavalink.jar --name "Lavalink"
|
||||||
sudo pm2 startup
|
sudo pm2 startup
|
||||||
sudo pm2 save
|
sudo pm2 save
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue