aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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