File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Install the wtop privileged helper daemon.
3+ # Run with: sudo wtop-helper-install
4+ set -euo pipefail
5+
6+ HELPER_SRC=" $( dirname " $0 " ) /wtop-helper"
7+ HELPER_DEST=" /Library/PrivilegedHelperTools/me.abizer.wtop.helper"
8+ PLIST_SRC=" $( dirname " $0 " ) /../etc/wtop/me.abizer.wtop.helper.plist"
9+ PLIST_DEST=" /Library/LaunchDaemons/me.abizer.wtop.helper.plist"
10+
11+ if [ " $( id -u) " -ne 0 ]; then
12+ echo " This script must be run with sudo."
13+ exit 1
14+ fi
15+
16+ mkdir -p /Library/PrivilegedHelperTools
17+ cp " $HELPER_SRC " " $HELPER_DEST "
18+ chmod 755 " $HELPER_DEST "
19+ cp " $PLIST_SRC " " $PLIST_DEST "
20+
21+ launchctl bootout system/me.abizer.wtop.helper 2> /dev/null || true
22+ launchctl bootstrap system " $PLIST_DEST "
23+
24+ echo " wtop helper installed (on-demand — starts when wtop.app opens)"
You can’t perform that action at this time.
0 commit comments