Async functions #168

Closed
Sirherobrine23 wants to merge 14 commits from AsyncFunctions into main
10 changed files with 126 additions and 127 deletions
Showing only changes of commit 3827b0cad4 - Show all commits

View File

@ -4,7 +4,7 @@ set -ex
apt update
# Install Necessary Packages
apt install -y curl wget git zsh sudo unzip zip jq python python3 screen
apt -qq install -y curl wget git zsh sudo unzip zip jq python python3 screen
# Install nodejs from github release
get_current_node_version=$(curl -sL https://api.github.com/repos/nodejs/node/releases/latest | grep tag_name | cut -d '"' -f 4)
@ -21,10 +21,10 @@ esac
mkdir /tmp/Node
tar -xJf /tmp/node.tar.xz -C /tmp/Node
rm -rf /tmp/node.tar.xz
cp -rfv /tmp/Node/*/* /usr
cp -rf /tmp/Node/*/* /usr
# Install Build Dependencies and others Packages
apt install -y ca-certificates make build-essential procps lsb-release xdg-utils g++ libatomic1 libnss3 libatk-bridge2.0-0 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxrender1 libxss1 libxtst6 fonts-liberation libnss3 libgbm-dev
apt -qq install -y ca-certificates make build-essential procps lsb-release xdg-utils g++ libatomic1 libnss3 libatk-bridge2.0-0 gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxrender1 libxss1 libxtst6 fonts-liberation libnss3 libgbm-dev
# Update npm
npm -g install npm@$(curl -sL https://api.github.com/repos/npm/cli/releases/latest | grep tag_name | cut -d '"' -f 4)
@ -39,16 +39,17 @@ if ! [ "$(uname -m)" == "x86_64" ];then
fi
# Install openjdk
case "$(uname -m)" in
x86_64 | aarch64 ) apt install -y openjdk-17*;;
* ) apt install -y openjdk-11*;;
case `apt search openjdk` in
*openjdk-17* ) apt install -y openjdk-17*;;
*openjdk-11* ) apt install -y openjdk-11*;;
* ) echo "No openjdk version found, skipping";;
esac
# Setup non root user
useradd -m -p "$(perl -e 'print crypt($ARGV[0], "password")' "LucaA1113ba21")" "thebds"
addgroup thebds sudo
addgroup thebds root
usermod --shell /bin/bash thebds;
usermod --shell /usr/bin/zsh thebds;
echo "thebds ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
# Remove Unnecessary Packages