Compare commits

...

20 Commits

Author SHA1 Message Date
lunardunno 7c6daf1e83 Final Cut 2023-11-25 14:46:20 +04:00
lunardunno f4c06f952e script minimization 2023-11-25 13:46:19 +04:00
lunardunno ab13e98ad2 some changes 2023-11-25 10:34:43 +04:00
lunardunno 4e29ce7139 returned condition
returned condition before enable --now docker
2023-11-25 06:29:53 +04:00
lunardunno 60d58915c0 rolling back some changes 2023-11-24 18:00:10 +04:00
lunardunno c0302b7a01 cancel changes for Ubuntu 22 2023-11-24 15:39:29 +04:00
lunardunno fecdd60787 fix lines not found 2023-11-24 08:34:59 +04:00
lunardunno 75987b8b45 script minimization 2023-11-24 06:19:17 +04:00
lunardunno 4109e9db58 improved support for Ubuntu 22.04 2023-11-24 05:46:22 +04:00
lunardunno 8e10144717 bringing the code to uniformity 2023-11-23 19:08:27 +04:00
lunardunno 2410bf6838 Apply suggestions from code review
Co-authored-by: tiaga <10153548+tiaga@users.noreply.github.com>
2023-11-23 17:59:10 +04:00
lunardunno bd595f2c94 status check via variable
returned docker status check via variable
2023-11-23 07:25:18 +04:00
lunardunno 7d7a4c154d returned the penultimate line 2023-11-23 04:34:37 +04:00
lunardunno d66304f814 deleting the penultimate line
Removed the line “if! command -v docker > /dev/null 2>&1; then display "Docker Installation Error"; output 1; fi;\", because of it the script did not interrupt execution.
docker presence check function, executes docker --version/
2023-11-22 23:43:10 +04:00
lunardunno e7a1a93d84 rollback some changes
rollback some changes to dev
2023-11-22 07:03:53 +04:00
lunardunno 9f29bc9afe improved readability 2023-11-21 04:41:54 +04:00
lunardunno a6ffd2a675 changing places for pauses and checks
Return to -yq for Debian and Ubuntu.
Added places to check fuser and lsof installation results.
Moved places for check sudo and docker installation results.
The location of pauses has been changed.
All pauses are reduced to 5s.
2023-11-21 02:33:43 +04:00
lunardunno 795737bbc3 introducing sudo check
introduced check for the presence of sudo at the end of script execution
2023-11-20 06:44:50 +04:00
lunardunno 61f55af76b Changing sleep timer
Adding a pause before checking docker status.
Change the pause before attempting to update docker.
2023-11-20 04:19:54 +04:00
lunardunno 6c5a12e626 Minimization and fixes of the script for running docker.service
Script minimization.
Minimizing log information for Debian and Ubuntu.
Changing the startup logic of docker.
Excluding $dist debian from sudo systemctl Enable --now docker since this is done in the post-installation phase.
Exception installation of Curl if docker.service status is not active.
Change startup to restart if docker.service status is not active.
Returning a 5s delay for correct execution when reinstalling docker.io on Ubuntu22.
Fix the docker installation status check at the end of the script.
Introduced docker.service status check and corresponding error notification at the end of the script.
2023-11-19 23:04:18 +04:00
+3 -5
View File
@@ -8,12 +8,10 @@ if ! command -v sudo > /dev/null 2>&1; then $pm $check_pkgs; $pm $silent_inst su
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;\
if [ "$dist" = "fedora" ] || [ "$dist" = "centos" ] || [ "$dist" = "debian" ]; then sudo systemctl enable docker && sudo systemctl start docker; fi;\
sleep 5 && sudo systemctl enable --now docker && sleep 5;\
fi;\
if [ "$dist" = "debian" ]; then \
docker_service=$(systemctl list-units --full --all | grep docker.service | grep -v inactive | grep -v dead | grep -v failed);\
if [ -z "$docker_service" ]; then sudo $pm $check_pkgs; sudo $pm $silent_inst curl $docker_pkg; fi;\
sleep 3 && sudo systemctl start docker && sleep 3;\
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 Docker"; exit 1; fi;\
docker --version