9 lines
487 B
Bash
9 lines
487 B
Bash
#!/bin/sh
|
|
set -eu
|
|
[ "${3:-/}" = / ] || { echo 'Install LanUps onto the running macOS system volume.' >&2; exit 1; }
|
|
if launchctl print system/local.lanups.agent >/dev/null 2>&1; then launchctl bootout system/local.lanups.agent; fi
|
|
user=$(/usr/bin/stat -f '%Su' /dev/console)
|
|
case "$user" in root|loginwindow|_mbsetupuser|'') exit 0;; esac
|
|
uid=$(id -u "$user")
|
|
if launchctl print "gui/$uid/local.lanups.desktop" >/dev/null 2>&1; then launchctl bootout "gui/$uid/local.lanups.desktop"; fi
|