Increasing readability

This commit is contained in:
lunardunno 2025-04-30 19:18:01 +04:00 committed by GitHub
parent 5df579ae11
commit b8b3949f13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,25 +11,24 @@ if ! command -v fuser > /dev/null 2>&1; then sudo $pm $check_pkgs; sudo $pm $sil
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;\
if [ -z "$(sudo $pm $what_pkg $docker_pkg 2>/dev/null | grep podman)" ];\
then sudo $pm $silent_inst $docker_pkg;\
if [ -z "$(sudo $pm $what_pkg $docker_pkg 2>/dev/null | grep podman)" ]; then \
sudo $pm $silent_inst $docker_pkg;\
else echo "Podman is not supported"; exit 1;\
fi;\
sleep 5; sudo systemctl enable --now docker; sleep 5;\
fi;\
if [ "$(cat /sys/module/apparmor/parameters/enabled 2>/dev/null)" = "Y" ]; then \
if ! command -v apparmor_parser > /dev/null 2>&1; then sudo $pm $check_pkgs; sudo $pm $silent_inst apparmor; fi;\
if [ "$(cat /sys/module/apparmor/parameters/enabled 2>/dev/null)" = "Y" ] && ! command -v apparmor_parser > /dev/null 2>&1; then \
sudo $pm $check_pkgs; sudo $pm $silent_inst apparmor;\
fi;\
if [ "$(systemctl is-active docker)" != "active" ]; then \
if [ -z "$(sudo docker --version 2>/dev/null | grep podman)" ];\
then \
if [ -z "$(sudo docker --version 2>/dev/null | grep podman)" ]; then \
sudo $pm $check_pkgs;\
if [ -z "$(sudo $pm $what_pkg $docker_pkg 2>/dev/null | grep podman)" ];\
then sudo $pm $silent_inst $docker_pkg;\
if [ -z "$(sudo $pm $what_pkg $docker_pkg 2>/dev/null | grep podman)" ]; then \
sudo $pm $silent_inst $docker_pkg;\
fi;\
sleep 5; sudo systemctl start docker; sleep 5;\
if [ "$(systemctl is-active docker)" != "active" ];\
then echo "Status Docker is not active";\
if [ "$(systemctl is-active docker)" != "active" ]; then \
echo "Status Docker is not active";\
fi;\
else echo "Podman is not supported";\
fi;\