mirror of
https://github.com/utmapp/vd_agent.git
synced 2026-12-01 07:53:18 -10:00
13 lines
305 B
Bash
Executable File
13 lines
305 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
GUI_USER=$(stat -f%Su /dev/console)
|
|
GUI_UID=$(id -u $GUI_USER)
|
|
|
|
/bin/launchctl load /Library/LaunchDaemons/com.redhat.spice.vdagentd.plist
|
|
|
|
if [ "$GUI_USER" != "root" ]; then
|
|
/bin/launchctl asuser $GUI_UID /bin/launchctl load /Library/LaunchAgents/com.redhat.spice.vdagent.plist
|
|
fi
|