Advertisement
AZZATSSINS_CYBERSERK

ALPINE LINUX ON TERMUX (NO ROOT) OS LINUX MINIMALIS [ 2MB ]

Dec 26th, 2019
759
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.29 KB | None | 0 0
  1. #!/data/data/com.termux/files/usr/bin/bash
  2. ##### ALPINE ### APK INSTALL <PACKAGES> ####
  3. #### OS LINUX MINIMALIS + RECOMENDED ####
  4. #### DOWNLOAD RESOURCE : 2MB ####
  5. ## apt update
  6. ## apt upgrae
  7. ## apt install wget proot
  8. ## pkg install wget proot
  9. ## clear
  10. ## mkdir "alpine"
  11. ## mkdir "alp"
  12. ## cd "alp"
  13. ## wget "https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Rootfs/Alpine/armhf/alpine-minirootfs-3.10.0-armhf.tar.gz" -O azzatssins.tar.gz
  14. ## proot --link2symlink tar -xf azzatssins.tar.gz --exclude='dev' 2> /dev/null||:
  15. ## echo "nameserver 8.8.8.8" > etc/resolv.conf
  16. ## echo "nameserver 8.8.4.4" >> etc/resolv.conf
  17. ## cd ".."
  18. ## cd "$HOME"
  19. ##### BOOTING #####
  20. cd $(dirname $0)
  21. ## unset LD_PRELOAD in case termux-exec is installed
  22. unset LD_PRELOAD
  23. command="proot"
  24. command+=" --link2symlink"
  25. command+=" -0"
  26. command+=" -r alp"
  27. if [ -n "$(ls -A alpine)" ]; then
  28.     for f in alpine/* ;do
  29.       . $f
  30.     done
  31. fi
  32. command+=" -b /dev"
  33. command+=" -b /proc"
  34. command+=" -b alp/root:/dev/shm"
  35. command+=" -w /root"
  36. command+=" /usr/bin/env -i"
  37. command+=" HOME=/root"
  38. command+=" PATH=PATH=/bin:/usr/bin:/sbin:/usr/sbin"
  39. command+=" TERM=$TERM"
  40. command+=" LANG=C.UTF-8"
  41. command+=" /bin/sh --login"
  42. com="$@"
  43. if [ -z "$1" ];then
  44.     exec $command
  45. else
  46.     $command -c "$com"
  47. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement