summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2024-04-10 09:30:17 +0300
committerGitHub <noreply@github.com>2024-04-10 09:30:17 +0300
commitc41702d9daf4f5c0edd417db7ff76ea10735ef57 (patch)
tree01de731d0dd02aa7b5f4bdecabd005d60ef01f6d /packaging
parent3cf286e4e0f2a44bdc125f99255baefaa22505f9 (diff)
uninstaller: remove LaunchDaemons plist file (macOS) (#17357)
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/installer/netdata-uninstaller.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/packaging/installer/netdata-uninstaller.sh b/packaging/installer/netdata-uninstaller.sh
index dcd9d965de..1627ca6b5d 100755
--- a/packaging/installer/netdata-uninstaller.sh
+++ b/packaging/installer/netdata-uninstaller.sh
@@ -723,6 +723,10 @@ trap quit_msg EXIT
info "Stopping a possibly running netdata..."
stop_all_netdata
+if [ "$(uname -s)" = "Darwin" ]; then
+ launchctl unload /Library/LaunchDaemons/com.github.netdata.plist 2>/dev/null
+fi
+
#### REMOVE NETDATA FILES
rm_file /etc/logrotate.d/netdata
rm_file /etc/systemd/system/netdata.service
@@ -741,6 +745,7 @@ rm_file /etc/periodic/daily/netdata-updater
rm_file /etc/cron.daily/netdata-updater
rm_file /etc/cron.d/netdata-updater
rm_file /etc/cron.d/netdata-updater-daily
+rm_file /Library/LaunchDaemons/com.github.netdata.plist
if [ -n "${NETDATA_PREFIX}" ] && [ -d "${NETDATA_PREFIX}" ] && [ "netdata" = "$(basename "$NETDATA_PREFIX")" ] ; then