Files
firezone/scripts/uninstall.sh
Andrew 2f11771d59 Update install script and docs for Cloudsmith package repo (#809)
* Update install script to setup and install firezone from cloudsmith repo

* silence source repo file not found when removing

* Update docs with cloudsmith repo instructions, add feedback message to uninstall

* Fix supported platforms link

* add upgrade note to post install pkg script & only grep config file for check if it exists

* Clean up install server doc links

* use apt-get instead of apt, add RHEL 7,8,9 & OLS 7,8,9

* Use more cross platform compatible terminal text styles
2022-07-25 11:47:58 -07:00

54 lines
1.6 KiB
Bash
Executable File

#!/bin/sh
echo 'Removing Firezone network settings...'
firezone-ctl teardown-network
echo 'Removing all Firezone directories...'
firezone-ctl cleanse yes
echo 'Stopping ACME from renewing certificates...'
firezone-ctl stop-cert-renewal
echo 'Removing firezone package...'
if type apt-get > /dev/null; then
DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge firezone
rm /etc/apt/sources.list.d/firezone-firezone.list
apt-get clean
rm -rf /var/lib/apt/lists/*
apt-get -qqy update
elif type yum > /dev/null; then
yum remove -y firezone
rm /etc/yum.repos.d/firezone-firezone.repo
# some distros (eg, CentOS 7) do not include this repo file
# silence if it can't be found for removal
rm /etc/yum.repos.d/firezone-firezone-source.repo 2> /dev/null
elif type zypper > /dev/null; then
zypper --non-interactive remove -y -u firezone
zypper --non-interactive rr firezone-firezone
zypper --non-interactive rr firezone-firezone-source
else
echo 'Warning: package management tool not found; not '\
'removing installed package. This can happen if your'\
' package management tool (e.g. yum, apt, etc) is no'\
't in your $PATH. Continuing...'
fi
echo 'Removing remaining directories...'
rm -rf \
/var/opt/firezone \
/var/log/firezone \
/etc/firezone \
/usr/bin/firezone-ctl \
/opt/firezone
echo 'Done! Firezone has been uninstalled.'
bold=$(tput bold)
normal=$(tput sgr0)
echo $bold
echo 'We rely on feedback from users to steer development.' \
'Would you mind taking a minute to share product feedback in exchange' \
'for some Firezone stickers?'
echo "https://firezone.dev/feedback#source=uninstall-script"
echo $normal