diff options
author | Filipp Lepalaan <filipp@mac.com> | 2011-05-15 12:27:09 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2011-05-15 12:27:09 +0300 |
commit | 4eccc89ade476790ef1511a22707bb25127622f5 (patch) | |
tree | 88a66acc6fe049b9e9c623e9a868a37723c4fae7 | |
parent | a2a9f4896b4b8329427d0333ed019538340fc882 (diff) | |
download | mtk-4eccc89ade476790ef1511a22707bb25127622f5.tar.gz mtk-4eccc89ade476790ef1511a22707bb25127622f5.tar.bz2 mtk-4eccc89ade476790ef1511a22707bb25127622f5.zip |
testing
-rwxr-xr-x | up2date.app/Contents/Resources/up2date.sh | 13 |
1 files 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 |