From 6d8bf5a997f1e1b9db058cf932be1fb9bb9c049c Mon Sep 17 00:00:00 2001 From: Josh S Date: Mon, 28 Nov 2022 14:19:42 -0500 Subject: [PATCH] Update install.sh --- install.sh | 53 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/install.sh b/install.sh index ef6894c..4542ecc 100644 --- a/install.sh +++ b/install.sh @@ -3,6 +3,8 @@ set -e echo -e "\e[32m # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Lavalink Installation Script # +# Created and maintained by Josh S. # +# Author Josh S. | https://joshsevero.dev # # This Script only works on Ubuntu & Debian # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\e[0m" @@ -37,7 +39,7 @@ fi # Install NodeJS if ! [ -x "$(command -v node)" ]; then 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 if [[ -n "NodeJSVer" ]] then @@ -79,7 +81,8 @@ echo "What port do you want your Lavalink to run on?" read Lava_Port echo "What password do you want to set for your Lavalink?" read Lava_Pass -echo "server: # REST and WS server +echo " +server: # REST and WS server port: $Lava_Port address: 0.0.0.0 @@ -87,11 +90,11 @@ lavalink: server: password: \"$Lava_Pass\" 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: useEpoll: true highPacketPriority: true - bufferDurationMs: 400 + bufferDurationMs: 200 byteBufAllocator: "default" sources: # Remote sources @@ -112,15 +115,15 @@ lavalink: lavaplayer: nonAllocating: false # Whether to use the non-allocating frame buffer. 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 youtubeSearchEnabled: true odyseeSearchEnabled: true soundcloudSearchEnabled: true yandexMusicSearchEnabled: true - #youtubeConfig: (Youtube account credentials, needed to play age restricted tracks) - #email: "" - #password: "" + #youtubeConfig: + # email: "" + # password: "" # You can get your yandex oauth token here https://music-yandex-bot.ru/ used to remove the 30s limit on some tracks #yandexOAuthToken: #ratelimit: @@ -142,22 +145,38 @@ sentry: # some_key: some_value # another_key: another_value -logging: - file: - path: ./logs/ - logback: - rollingpolicy: - max-file-size: 1GB - max-history: 30 +#logging: +# file: +# path: ./logs/ +# logback: +# rollingpolicy: +# max-file-size: 1GB +# max-history: 30 level: root: INFO lavalink: INFO " > 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" # Start Lavalink -sudo pm2 start Lavalink.jar --name "Lavalink" +sudo pm2 start ~/Lavalink/config.json Lavalink.jar --name "Lavalink" sudo pm2 startup sudo pm2 save