skip docker question if apt doesn't exists
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
13
install.sh
13
install.sh
@@ -477,6 +477,7 @@ uninstall() {
|
|||||||
|
|
||||||
# $SUDO_CMD /sbin/iptables -D DOCKER-USER -F
|
# $SUDO_CMD /sbin/iptables -D DOCKER-USER -F
|
||||||
|
|
||||||
|
if [ "$APT" == "1" ]; then
|
||||||
echo "Would you like to remove docker? (Y/n)";
|
echo "Would you like to remove docker? (Y/n)";
|
||||||
read -r ANSWER;
|
read -r ANSWER;
|
||||||
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ]; then
|
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ]; then
|
||||||
@@ -488,11 +489,13 @@ uninstall() {
|
|||||||
|
|
||||||
echo "x";
|
echo "x";
|
||||||
fi
|
fi
|
||||||
|
fi;
|
||||||
|
|
||||||
echo "x";
|
echo "x";
|
||||||
}
|
}
|
||||||
|
|
||||||
SUDO_CMD="";
|
SUDO_CMD="";
|
||||||
|
APT=$($SUDO_CMD type apt 2>/dev/null | grep 'apt is' | wc -l);
|
||||||
|
|
||||||
if [ "$1" == "remove" ]; then
|
if [ "$1" == "remove" ]; then
|
||||||
ACTION="uninstall";
|
ACTION="uninstall";
|
||||||
@@ -542,9 +545,10 @@ if [ -n "$WSL_DISTRO_NAME" ]; then
|
|||||||
fi
|
fi
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
echo "Would you like to install/update docker? (y/N)";
|
if [ "$APT" == "1" ]; then
|
||||||
read -r ANSWER;
|
echo "Would you like to install/update docker? (y/N)";
|
||||||
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ]; then
|
read -r ANSWER;
|
||||||
|
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ]; then
|
||||||
|
|
||||||
if [ -f "/etc/apt/keyrings/docker.gpg" ]; then
|
if [ -f "/etc/apt/keyrings/docker.gpg" ]; then
|
||||||
rm -f /etc/apt/keyrings/docker.gpg
|
rm -f /etc/apt/keyrings/docker.gpg
|
||||||
@@ -556,7 +560,8 @@ if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ]; then
|
|||||||
|
|
||||||
echo "Wait..."
|
echo "Wait..."
|
||||||
sleep 5
|
sleep 5
|
||||||
fi
|
fi
|
||||||
|
fi;
|
||||||
|
|
||||||
$SUDO_CMD docker pull registry.format.hu/installer-tool
|
$SUDO_CMD docker pull registry.format.hu/installer-tool
|
||||||
$SUDO_CMD docker pull registry.format.hu/setup
|
$SUDO_CMD docker pull registry.format.hu/setup
|
||||||
|
Reference in New Issue
Block a user