From 795481d0effb4654f51bb610b4047ed8573df805 Mon Sep 17 00:00:00 2001 From: "b.waal" Date: Thu, 1 Aug 2024 15:05:14 +0200 Subject: [PATCH] Update installer.sh --- installer.sh | 64 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 15 deletions(-) diff --git a/installer.sh b/installer.sh index 9bec20d..667eea5 100644 --- a/installer.sh +++ b/installer.sh @@ -18,6 +18,24 @@ BRANCH=main GIT=https://git.ictcorpnet.com/b.waal/$REPO/raw + +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi + + + + +if (whiptail --title "LanCache - Prefill" --yesno "Use SteamPrefill?." 8 78); then + echo "" + prefill=true + else + prefill=false +fi + + + ##---------------## # Pre-Updater # ##---------------## @@ -45,10 +63,9 @@ fi #$PKGI curl wget whiptail sudo apt update apt upgrade -y -#Docker Requirements -apt install openssh-server curl wget nload htop nano gnupg ca-certificates -y -#Steam Prefill Requirements -apt install jq unzip -y +$PKGUD +$PKGI curl wget whiptail gnupg ca-certificates + ##------------------## # Docker Compose # @@ -59,8 +76,17 @@ curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/ chmod a+r /etc/apt/keyrings/docker.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null -apt update -apt-get install docker-ce docker-ce-cli docker-compose-plugin -y + +$PKGUD +apt list --upgradeable 2>/dev/null | cut -d/ -f1 | grep -v Listing >> /tmp/install.list +echo "openssh-server curl wget nload htop nano" >> /tmp/install.list +echo "docker-ce docker-ce-cli docker-compose-plugin" >> /tmp/install.list + +if [[ $prefill == "true" ]]; then + echo "jq unzip" >> /tmp/install.list +fi + +xargs < /tmp/install.list xargs $PKGI systemctl enable --now docker @@ -79,6 +105,13 @@ userdel branco update-grub +echo "" >> /etc/sysctl.conf +echo "#Disable IPv6" >> /etc/sysctl.conf +echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf +echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf +echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf + + ##-------------## # Installer # ##-------------## @@ -92,9 +125,6 @@ wget $GIT/$BRANCH/config/lancache/docker.yml -O /opt/lancache/docker-compose.yml # Steam Prefill # ##----------------## -#/opt/lancache/tools/SteamPrefill/SteamPrefill prefill --recent --os windows --no-ansi -#/opt/lancache/tools/SteamPrefill/SteamPrefill prefill --os windows --no-ansi - cd /opt/lancache/tools/SteamPrefill curl -o /opt/lancache/tools/SteamPrefill/update.sh --location "https://raw.githubusercontent.com/tpill90/steam-lancache-prefill/master/scripts/update.sh" chmod +x /opt/lancache/tools/SteamPrefill/update.sh @@ -114,6 +144,14 @@ systemctl enable steamprefill-selected.service systemctl enable steamprefill-recent.service +##---------------## +# Cleaning up # +##---------------## + +apt remove --purge vim* mailcap* man-db* manpages* laptop-detect* publicsuffix* xkb-data* python* +apt autoremove -y + + ##------------------## # Start LanCache # ##------------------## @@ -123,9 +161,5 @@ docker compose up -d cd ~ -##---------------## -# Cleaning up # -##---------------## - -apt remove --purge vim* mailcap* man-db* manpages* laptop-detect* publicsuffix* xkb-data* python* -apt autoremove -y \ No newline at end of file +#/opt/lancache/tools/SteamPrefill/SteamPrefill prefill --recent --os windows --no-ansi +#/opt/lancache/tools/SteamPrefill/SteamPrefill prefill --os windows --no-ansi \ No newline at end of file