Professional Documents
Culture Documents
Root 2
Root 2
#!/bin/sh
#############################
# Linux Installation #
#############################
export PATH=$PATH:~/.local/usr/bin
max_retries=50
timeout=1
# Download & decompress the Linux root file system if not already installed.
if [ ! -e $ROOTFS_DIR/.installed ]; then
echo
"##################################################################################
#####"
echo "#"
echo "# Biralo Gaming"
echo "#"
echo "# Copyright (C) 2022 - 2023, VPSFREE.ES"
echo "#"
echo "#"
echo
"##################################################################################
#####"
echo ""
echo "* [0] Debian - "
echo "* [1] Ubuntu - RDP Support"
echo "* [2] Alpine - "
case $input in
0)
wget --tries=$max_retries --timeout=$timeout --no-hsts -O /tmp/rootfs.tar.xz \
"https://github.com/termux/proot-distro/releases/download/v3.10.0/debian-$
{ARCH}-pd-v3.10.0.tar.xz"
apt download xz-utils
deb_file=$(find $ROOTFS_DIR -name "*.deb" -type f)
dpkg -x $deb_file ~/.local/
rm "$deb_file"
1)
wget --tries=$max_retries --timeout=$timeout --no-hsts -O /tmp/rootfs.tar.gz \
"http://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/ubuntu-base-
20.04.4-base-${ARCH_ALT}.tar.gz"
2)
wget --tries=$max_retries --timeout=$timeout --no-hsts -O /tmp/rootfs.tar.gz \
"https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-minirootfs-
3.18.3-${ARCH}.tar.gz"
esac
fi
################################
# Package Installation & Setup #
################################
# Download static APK-Tools temporarily because minirootfs does not come with APK
pre-installed.
if [ ! -e $ROOTFS_DIR/.installed ]; then
# Download the packages from their sources
mkdir $ROOTFS_DIR/usr/local/bin -p
while [ ! -s "$ROOTFS_DIR/usr/local/bin/proot" ]; do
rm $ROOTFS_DIR/usr/local/bin/proot -rf
wget --tries=$max_retries --timeout=$timeout --no-hsts -O
$ROOTFS_DIR/usr/local/bin/proot
"https://raw.githubusercontent.com/dxomg/vpsfreepterovm/main/proot-${ARCH}"
if [ -s "$ROOTFS_DIR/usr/local/bin/proot" ]; then
# Make PRoot executable.
chmod 755 $ROOTFS_DIR/usr/local/bin/proot
break # Exit the loop since the file is not empty
fi
fi
display_footer() {
echo -e "${BOLD_MAGENTA}___________________________________________________$
{RESET_COLOR}"
echo -e ""
echo -e " ${YELLOW}-----> VPS HAS STARTED <----${RESET_COLOR}"
}
display_header
display_resources
display_footer
###########################
# Start PRoot environment #
###########################