aboutsummaryrefslogtreecommitdiffstats
path: root/sandman.command
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-02-23 12:04:00 +0200
committerFilipp Lepalaan <filipp@mac.com>2010-02-23 12:04:00 +0200
commit773c60207176e988e715a70af8e76dd3273ac9a2 (patch)
tree859947d72ff52618bd768a607c454c23562949d6 /sandman.command
parent31570178e47653ca0e026009a7996e2f664d4aa6 (diff)
downloadmtk-773c60207176e988e715a70af8e76dd3273ac9a2.tar.gz
mtk-773c60207176e988e715a70af8e76dd3273ac9a2.tar.bz2
mtk-773c60207176e988e715a70af8e76dd3273ac9a2.zip
sandman root fix
Diffstat (limited to 'sandman.command')
-rw-r--r--sandman.command12
1 files changed, 6 insertions, 6 deletions
diff --git a/sandman.command b/sandman.command
index 5dca427..6eb8241 100644
--- a/sandman.command
+++ b/sandman.command
@@ -1,16 +1,16 @@
-#! /usr/bin/env bash
+#!/usr/bin/env bash
+
+# Letsgetletsgetletsgetletsget root!
+echo $ROOTPW | sudo -sS
+
if [[ $USER != "root" ]]; then
echo "This must be run as root"
exit 1
fi
-ROOTPW="1234"
-DELAY=120
-LOGFILE=~/Desktop/sandman.command.log
-
osascript -e "delay $DELAY"
TIMESTAMP=$(php -r "echo date ('H:i:s"', time() + $DELAY);")
-echo $ROOTPW | sudo -S pmset repeat poweron MTWRFSU $TIMESTAMP
+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"