subscription_manager

subscription manager accounting for Centos 7
This commit is contained in:
lunardunno
2023-12-15 05:45:26 +04:00
committed by GitHub
parent be799daafe
commit ae65c0a4ba

View File

@@ -8,7 +8,13 @@ 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 \
if [ "$dist" = "centos" ]; then \
CHECK_FILE=/etc/yum/pluginconf.d/subscription-manager.conf;\
if [ -f "$CHECK_FILE" ]; then CHANGE_NEED=0; else CHANGE_NEED=1; fi;\
fi;\
sudo $pm $check_pkgs; sudo $pm $silent_inst $docker_pkg;\
if [ "$dist" = "centos" ] && [ "$CHANGE_NEED" = "1" ];\
then echo -e "[main]\nenabled=0" > $CHECK_FILE; fi;
sleep 5; sudo systemctl enable --now docker; sleep 5;\
fi;\
if [ "$(systemctl is-active docker)" != "active" ]; then \