From bfe703327fda52dd601a878bbd70352ebbb92810 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Fri, 23 Jul 2021 18:21:27 +0200 Subject: Ergo deployment improvements, new Ergo update and Ergo removal scripts Signed-off-by: Georg Pfuetzenreuter --- scripts/sh/remove_ergo.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 scripts/sh/remove_ergo.sh (limited to 'scripts/sh/remove_ergo.sh') diff --git a/scripts/sh/remove_ergo.sh b/scripts/sh/remove_ergo.sh new file mode 100755 index 0000000..c9af4de --- /dev/null +++ b/scripts/sh/remove_ergo.sh @@ -0,0 +1,19 @@ +#!/bin/sh +if [ ! /opt/ergo ] +echo +then +read -p "Remove Ergo? This will kill running Ergo services and cause data loss. " -n 1 -r +echo +if [[ $REPLY =~ ^[Yy]$ ]] +then +echo "Removing Ergo" +systemctl disable --now ergo.service || true +rm -f /etc/systemd/system/ergo.service +rm -rf /opt/ergo +userdel -f ergo +groupdel -f ergo +echo "OK" +fi +else +echo "Could not find a compatible installation of Ergo." +fi -- cgit v1.2.3