wireshark/packaging/macosx/ChmodBPF/uninstall-scripts/postinstall

23 lines
468 B
Bash
Executable File

#!/bin/sh
#
# Remove the following:
# - The ChmmodBPF launch daemon
# - The ChmmodBPF script
# - The access_bpf group
#
CHMOD_BPF_PLIST="/Library/LaunchDaemons/org.wireshark.ChmodBPF.plist"
BPF_GROUP="access_bpf"
launchctl unload -F "$CHMOD_BPF_PLIST"
dscl . -read /Groups/"$BPF_GROUP" > /dev/null 2>&1 && \
dseditgroup -q -o delete "$BPF_GROUP"
rm -rf "/Library/Application Support/Wireshark"
rm -f "$CHMOD_BPF_PLIST"
rm -rf /Library/StartupItems/ChmodBPF