mirror of
https://github.com/munki/munki.git
synced 2026-01-04 21:50:03 -06:00
17 lines
598 B
Bash
Executable File
17 lines
598 B
Bash
Executable File
#!/bin/sh
|
|
|
|
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
|
|
|
# installing on the current boot volume? kill MSC.app if it's running
|
|
if [ "$3" == "/" ]; then
|
|
CONSOLEUSER=$(who | grep console | cut -d" " -f1)
|
|
if [ "$CONSOLEUSER" != "" ] ; then
|
|
# is the console user running MSC.app?
|
|
killall -s -u "$CONSOLEUSER" "Managed Software Center" &>/dev/null
|
|
if [ $? -eq 0 ] ; then
|
|
# leave a flag so the postinstall knows to relaunch MSC.app
|
|
touch /tmp/com.googlecode.munki.relaunch_msc_app
|
|
fi
|
|
fi
|
|
killall "Managed Software Center" &>/dev/null
|
|
fi |