Skip to content

Commit bf9ff0b

Browse files
abizerclaude
andcommitted
Add install-helper.sh for one-step sudo helper install
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d0718ff commit bf9ff0b

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

support/install-helper.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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)"

0 commit comments

Comments
 (0)