aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-02-23 12:19:09 +0200
committerFilipp Lepalaan <filipp@mac.com>2010-02-23 12:19:09 +0200
commit5a6777379c6da389df145aca6c679f8eeabd2108 (patch)
tree3257ab43e874876e9fd5abf8d9a6a6c73fc757f4
parent4f59bcc3e9c2cf45cd83a6d26a9fbe3956cf4e6b (diff)
downloadmtk-5a6777379c6da389df145aca6c679f8eeabd2108.tar.gz
mtk-5a6777379c6da389df145aca6c679f8eeabd2108.tar.bz2
mtk-5a6777379c6da389df145aca6c679f8eeabd2108.zip
sandman root fix
-rw-r--r--sandman.command6
1 files changed, 4 insertions, 2 deletions
diff --git a/sandman.command b/sandman.command
index 7942069..adfe85e 100644
--- a/sandman.command
+++ b/sandman.command
@@ -1,14 +1,16 @@
#!/usr/bin/env bash
+DELAY=120
+
if [[ $USER != "root" ]]; then
echo "This must be run as root"
exit 1
fi
osascript -e "delay $DELAY"
-TIMESTAMP=$(php -r "echo date ('H:i:s"', time() + $DELAY);")
+TIMESTAMP=$(php -r "echo date('H:i:s', time() + $DELAY);")
pmset repeat poweron MTWRFSU $TIMESTAMP
echo -n $(date "+%d.%m.%y @ %H:%I:%S") >> $LOGFILE
echo " " $(wc -l $LOGFILE) >> $LOGFILE
-osascript -e "tell application "Finder" to shut down"
+osascript -e 'tell application "Finder" to shut down'
exit 0