From b779e7618ad42fef470a99d3fcde74190d6761d7 Mon Sep 17 00:00:00 2001 From: Jamil Bou Kheir Date: Mon, 27 Sep 2021 13:20:28 -0700 Subject: [PATCH] Use shell conditionals appropriately --- scripts/uninstall.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh index 8a5805364..1ab100d09 100755 --- a/scripts/uninstall.sh +++ b/scripts/uninstall.sh @@ -3,13 +3,10 @@ echo 'Removing all Firezone configuration data...' firezone-ctl cleanse yes -apt=`which apt-get` -yum=`which yum` - echo 'Removing firezone package...' -if [ -f $apt ]; then +if type apt-get > /dev/null; then apt-get remove -y --purge firezone -elif [ -f $yum ]; then +elif type yum > /dev/null; then yum remove -y firezone else echo 'apt-get or yum not found'