mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-17 08:16:06 +03:00
Compare commits
39 Commits
update_ser
...
sudo_not_f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28907241df | ||
|
|
1aec417fc9 | ||
|
|
fc0a9fd74f | ||
|
|
11fef3c653 | ||
|
|
1226d1b287 | ||
|
|
1028f6998f | ||
|
|
c5afd4a85a | ||
|
|
3289819673 | ||
|
|
e80562c60f | ||
|
|
a8b5601777 | ||
|
|
fe50027edf | ||
|
|
72beb609c4 | ||
|
|
b934ff9437 | ||
|
|
9cbf62ae7a | ||
|
|
c8e65abca0 | ||
|
|
ca3b1c9aba | ||
|
|
e22e6e252b | ||
|
|
9dd99f8080 | ||
|
|
01fab70c14 | ||
|
|
1c42e5e1b4 | ||
|
|
0a564692ac | ||
|
|
075b83a990 | ||
|
|
f0adbfed67 | ||
|
|
06cbaa75c8 | ||
|
|
5b29678348 | ||
|
|
63161df66b | ||
|
|
b6467cc279 | ||
|
|
e451862dd2 | ||
|
|
76f05da9c9 | ||
|
|
7f10a1349d | ||
|
|
b7fa882422 | ||
|
|
94effbd0b3 | ||
|
|
1f7714791e | ||
|
|
b60d9639e9 | ||
|
|
fcc7894527 | ||
|
|
cb2c4a7a3a | ||
|
|
4c1bada05d | ||
|
|
8fd83f15e0 | ||
|
|
2d1b3e36f1 |
@@ -1,20 +1,43 @@
|
||||
if which apt-get > /dev/null 2>&1; then pm=$(which apt-get); silent_inst="-yq install"; check_pkgs="-yq update"; docker_pkg="docker.io"; dist="debian";\
|
||||
elif which dnf > /dev/null 2>&1; then pm=$(which dnf); silent_inst="-yq install"; check_pkgs="-yq check-update"; docker_pkg="docker"; dist="fedora";\
|
||||
elif which yum > /dev/null 2>&1; then pm=$(which yum); silent_inst="-y -q install"; check_pkgs="-y -q check-update"; docker_pkg="docker"; dist="centos";\
|
||||
elif which pacman > /dev/null 2>&1; then pm=$(which pacman); silent_inst="-S --noconfirm --noprogressbar --quiet"; check_pkgs="> /dev/null 2>&1"; docker_pkg="docker"; dist="archlinux";\
|
||||
if which apt-get > /dev/null 2>&1; then pm=$(which apt-get); silent_inst="-yq install"; check_pkgs="-yq update"; what_pkg="-s install"; docker_pkg="docker.io"; dist="debian";\
|
||||
elif which dnf > /dev/null 2>&1; then pm=$(which dnf); silent_inst="-yq install"; check_pkgs="-yq check-update"; what_pkg="--assumeno install --setopt=tsflags=test"; docker_pkg="docker"; dist="fedora";\
|
||||
elif which yum > /dev/null 2>&1; then pm=$(which yum); silent_inst="-y -q install"; check_pkgs="-y -q check-update"; what_pkg="--assumeno install --setopt=tsflags=test"; docker_pkg="docker"; dist="centos";\
|
||||
elif which pacman > /dev/null 2>&1; then pm=$(which pacman); silent_inst="-S --noconfirm --noprogressbar --quiet"; check_pkgs="-Sup"; what_pkg="-Sp"; docker_pkg="docker"; dist="archlinux";\
|
||||
else echo "Packet manager not found"; exit 1; fi;\
|
||||
echo "Dist: $dist, Packet manager: $pm, Install command: $silent_inst, Check pkgs command: $check_pkgs, Docker pkg: $docker_pkg";\
|
||||
echo "Dist: $dist, Packet manager: $pm, Install command: $silent_inst, Check pkgs command: $check_pkgs, What pkg command: $what_pkg, Docker pkg: $docker_pkg";\
|
||||
if [ "$dist" = "debian" ]; then export DEBIAN_FRONTEND=noninteractive; fi;\
|
||||
if ! command -v sudo > /dev/null 2>&1; then $pm $check_pkgs; $pm $silent_inst sudo; fi;\
|
||||
if ! command -v fuser > /dev/null 2>&1; then sudo $pm $check_pkgs; sudo $pm $silent_inst psmisc; fi;\
|
||||
if ! command -v lsof > /dev/null 2>&1; then sudo $pm $check_pkgs; sudo $pm $silent_inst lsof; fi;\
|
||||
if ! command -v docker > /dev/null 2>&1; then \
|
||||
sudo $pm $check_pkgs; sudo $pm $silent_inst $docker_pkg;\
|
||||
sleep 5; sudo systemctl enable --now docker; sleep 5;\
|
||||
CHECK_LOCALE=$(locale | grep -c 'LANG=en_US.UTF-8');\
|
||||
if [ "$CHECK_LOCALE" = "0" ]; then \
|
||||
CHECK_LOCALE=$(locale | grep -c 'LANG=C.UTF-8');\
|
||||
if [ "$CHECK_LOCALE" = "0" ]; then \
|
||||
CHECK_LOCALE=$(locale -a | grep -c 'en_US.utf8');\
|
||||
if [ "$CHECK_LOCALE" != "0" ]; then export LC_ALL=en_US.UTF-8;\
|
||||
else \
|
||||
CHECK_LOCALE=$(locale -a | grep 'C.utf8');\
|
||||
if [ "$CHECK_LOCALE" != "0" ]; then export LC_ALL=C.UTF-8; fi;\
|
||||
fi;\
|
||||
fi;\
|
||||
fi;\
|
||||
if ! command -v sudo > /dev/null 2>&1; then $pm $check_pkgs; $pm $silent_inst sudo;\
|
||||
if ! command -v sudo > /dev/null 2>&1; then sudo; exit 1; fi;\
|
||||
fi;\
|
||||
if ! command -v fuser > /dev/null 2>&1; then sudo $pm $check_pkgs; sudo $pm $silent_inst psmisc;\
|
||||
if ! command -v fuser > /dev/null 2>&1; then fuser; exit 1; fi;\
|
||||
fi;\
|
||||
if ! command -v lsof > /dev/null 2>&1; then sudo $pm $check_pkgs; sudo $pm $silent_inst lsof;\
|
||||
if ! command -v lsof > /dev/null 2>&1; then lsof; exit 1; fi;\
|
||||
fi;\
|
||||
if ! command -v docker > /dev/null 2>&1; then sudo $pm $check_pkgs;\
|
||||
check_podman=$(sudo $pm $what_pkg $docker_pkg 2>&1 | grep -c podman-docker);\
|
||||
check_moby=$(sudo $pm $what_pkg $docker_pkg 2>&1 | grep -c moby-engine);\
|
||||
if [ "$check_podman" != "0" ] || [ "$check_moby" != "0" ]; then echo "Container is not supported"; exit 1;\
|
||||
else sudo $pm $silent_inst $docker_pkg;\
|
||||
if ! command -v docker > /dev/null 2>&1; then docker; exit 1;\
|
||||
else sleep 5; sudo systemctl enable --now docker; sleep 5; fi;\
|
||||
fi;\
|
||||
fi;\
|
||||
if [ "$(systemctl is-active docker)" != "active" ]; then \
|
||||
sudo $pm $check_pkgs; sudo $pm $silent_inst $docker_pkg;\
|
||||
sleep 5; sudo systemctl start docker; sleep 5;\
|
||||
fi;\
|
||||
if ! command -v sudo > /dev/null 2>&1; then echo "Failed to install sudo, command not found"; exit 1; fi;\
|
||||
if ! command -v docker > /dev/null 2>&1; then echo "Failed to install docker, command not found"; exit 1; fi;\
|
||||
docker --version
|
||||
|
||||
Reference in New Issue
Block a user