From 4eccc89ade476790ef1511a22707bb25127622f5 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Sun, 15 May 2011 12:27:09 +0300 Subject: testing --- up2date.app/Contents/Resources/up2date.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/up2date.app/Contents/Resources/up2date.sh b/up2date.app/Contents/Resources/up2date.sh index bdfc082..b9e4841 100755 --- a/up2date.app/Contents/Resources/up2date.sh +++ b/up2date.app/Contents/Resources/up2date.sh @@ -10,7 +10,8 @@ if [[ $(id -u) != 0 ]]; then fi ME=$0 -PLIST=/Library/LaunchDaemons/com.unflyingobject.mtk.up2date.plist +LOGFILE=/var/log/up2date.log +PLIST=/Library/LaunchAgents/com.unflyingobject.mtk.up2date.plist # updates available... if /usr/sbin/softwareupdate -l 2>&1 | grep -q 'found the following new' @@ -37,11 +38,11 @@ EOT exit 0 fi # wait for the GUI to come up... - while [[ ! /bin/ps aux | /usr/bin/grep loginwindow | /usr/bin/grep -qv grep ]]; do - sleep 5 - done - /usr/bin/open /var/log/system.log - /usr/sbin/softwareupdate -ia && /sbin/reboot +# while [[ ! (/bin/ps aux | /usr/bin/grep loginwindow | /usr/bin/grep -qv grep) ]]; do +# sleep 5 +# done + /usr/bin/open "${LOGFILE}" + /usr/sbin/softwareupdate -ia > "${LOGFILE}" 2>&1 && /sbin/reboot exit 0 fi -- cgit v1.2.3