From 61ab1b2bd2b9b72239341ed7823f54bdb7627c94 Mon Sep 17 00:00:00 2001 From: Prateek Machiraju Date: Fri, 7 Aug 2020 22:40:22 -0400 Subject: [PATCH] Add uninstall script (#78) --- scripts/uninstall.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scripts/uninstall.sh diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh new file mode 100644 index 000000000..95d63821a --- /dev/null +++ b/scripts/uninstall.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ "$(id -u)" != "0" ]; then + echo "This script must be run as root" 1>&2 + exit 1 +fi + +rm -rf /opt/photonvision/ +echo "Uninstalling systemd service..." +systemctl stop photonvision +systemctl disable photonvision +rm /lib/systemd/system/photonvision.service +rm /etc/systemd/system/photonvision.service +systemctl dameon-relaod +systemctl reset-failed