added display of a notification that the server is busy installing third-party software

- refactoring doInstallAction functions
This commit is contained in:
vladimir.kuznetsov 2023-01-01 21:48:20 +03:00
parent 3f257af7a9
commit 08a8eadb49
22 changed files with 398 additions and 346 deletions

View file

@ -0,0 +1,4 @@
pm_apt="/usr/bin/apt-get";\
if [[ -f "$pm_apt" ]]; then pm=$pm_apt; else exit; fi;\
if [[ ! -f "/usr/bin/sudo" ]]; then $pm update -y -q; $pm install -y -q sudo; fi;\
sudo fuser /var/lib/dpkg/lock-frontend

View file

@ -3,7 +3,7 @@ if [[ -f "$pm_apt" ]]; then pm=$pm_apt; docker_pkg="docker.io"; else pm=$pm_yum;
if [[ ! -f "/usr/bin/sudo" ]]; then $pm update -y -q; $pm install -y -q sudo; fi;\
docker_service=$(systemctl list-units --full -all | grep docker.service | grep -v inactive | grep -v dead | grep -v failed);\
if [[ -f "$pm_apt" ]]; then export DEBIAN_FRONTEND=noninteractive; fi;\
if [[ -z "$docker_service" ]]; then sudo $pm update -y -q; sudo $pm install -y -q curl $docker_pkg; fi;\
if [[ -z "$docker_service" ]]; then sudo $pm update -y -q; sudo $pm install -y -q curl $docker_pkg; fi;\
docker_service=$(systemctl list-units --full -all | grep docker.service | grep -v inactive | grep -v dead | grep -v failed);\
if [[ -z "$docker_service" ]]; then sleep 5 && sudo systemctl start docker && sleep 5; fi;\
docker --version