diff options
author | Georg Pfuetzenreuter | 2021-07-23 18:21:27 +0200 |
---|---|---|
committer | Georg Pfuetzenreuter | 2021-07-23 18:21:27 +0200 |
commit | bfe703327fda52dd601a878bbd70352ebbb92810 (patch) | |
tree | 212c5884681979f61c60c5c7bc6724abedf824a0 /scripts/sh/remove_ergo.sh | |
parent | c85c094f27483abb76a3cd4e1ed8fa8e88f3bd43 (diff) | |
download | system-bfe703327fda52dd601a878bbd70352ebbb92810.tar.gz system-bfe703327fda52dd601a878bbd70352ebbb92810.tar.bz2 system-bfe703327fda52dd601a878bbd70352ebbb92810.zip |
Ergo deployment improvements, new Ergo update and Ergo removal scripts
Signed-off-by: Georg Pfuetzenreuter <georg@lysergic.dev>
Diffstat (limited to 'scripts/sh/remove_ergo.sh')
-rwxr-xr-x | scripts/sh/remove_ergo.sh | 19 |
1 files changed, 19 insertions, 0 deletions
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 |