Add uninstall script (#78)

This commit is contained in:
Prateek Machiraju
2020-08-07 22:40:22 -04:00
committed by GitHub
parent 74f20a3150
commit 61ab1b2bd2

15
scripts/uninstall.sh Normal file
View File

@@ -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