mirror of
https://github.com/usestrix/firewall.git
synced 2026-11-09 05:19:35 -10:00
* Remove the CA from the app, not the extension * Uninstall through the bundled CLI * Log uninstall only when something was removed * Rename the Installer app to StrixFirewall (#28) * Rename the Installer app to Firewall * Name the app Strix Firewall * Name the app StrixFirewall * Show why the extension failed to start (#31) * Delete the CA secret without reading it * Treat a missing extension as already deactivated * Leave installing the app to the package
11 lines
455 B
Bash
Executable File
11 lines
455 B
Bash
Executable File
#!/bin/sh
|
|
# Runs as root. Loads the env agent into the logged-in session and opens the app to activate the extension.
|
|
user=$(stat -f %Su /dev/console)
|
|
[ "$user" = root ] && exit 0
|
|
uid=$(id -u "$user")
|
|
agent=/Library/LaunchAgents/com.usestrix.firewall.env.plist
|
|
launchctl bootout "gui/$uid" "$agent" 2>/dev/null
|
|
launchctl bootstrap "gui/$uid" "$agent"
|
|
launchctl asuser "$uid" sudo -u "$user" open -a /Applications/StrixFirewall.app --args --install
|
|
exit 0
|