Ergo deployment OS and existing installation check.

Signed-off-by: Georg Pfuetzenreuter <georg@lysergic.dev>
This commit is contained in:
Georg Pfuetzenreuter 2021-07-23 18:26:54 +02:00
parent 9ad1234cc4
commit 98b3b710a9
2 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,11 @@
#!/bin/sh #!/bin/sh
DISTRIB=$(awk -F= '/^NAME/{print $2}' /etc/os-release)
echo "Detected $DISTRIB"
if [[ ${DISTRIB} = "openSUSE Leap" ]]
echo
then
if [ ! -d /opt/ergo ]
then
GOVER=`go version | { read _ _ v _; echo ${v#go}; }` GOVER=`go version | { read _ _ v _; echo ${v#go}; }`
echo "Detected Go $GOVER" echo "Detected Go $GOVER"
GOVER_REQ="1.16.0" GOVER_REQ="1.16.0"
@ -53,3 +60,9 @@ fi
else else
echo "This is currently only compatible with Go 1.16.6 or higher. Consider deploy_go.sh." echo "This is currently only compatible with Go 1.16.6 or higher. Consider deploy_go.sh."
fi fi
else
echo "Existing Ergo installation or leftovers detected. Consider remove_ergo.sh."
fi
else
echo "This is currently only compatible with SUSE Leap nodes."
fi

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
if [ ! /opt/ergo ] if [ ! -d /opt/ergo ]
echo echo
then then
read -p "Remove Ergo? This will kill running Ergo services and cause data loss. " -n 1 -r read -p "Remove Ergo? This will kill running Ergo services and cause data loss. " -n 1 -r