diff options
author | Filipp Lepalaan <filipp@mac.com> | 2010-02-23 14:06:27 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2010-02-23 14:06:27 +0200 |
commit | 11076e677163dc974db3b4d9aa1ee67e23c760d1 (patch) | |
tree | acdf29ed8c7de24070e6aca4935d44db8c03c0d3 | |
parent | f0b6c2798b99d1b382ec8ec44b8f3ff572babd35 (diff) | |
download | mtk-11076e677163dc974db3b4d9aa1ee67e23c760d1.tar.gz mtk-11076e677163dc974db3b4d9aa1ee67e23c760d1.tar.bz2 mtk-11076e677163dc974db3b4d9aa1ee67e23c760d1.zip |
Tuned delays
-rwxr-xr-x[-rw-r--r--] | poweron.command | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/poweron.command b/poweron.command index be844e1..5dae15c 100644..100755 --- a/poweron.command +++ b/poweron.command @@ -2,16 +2,17 @@ ON_DELAY=20 OFF_DELAY=20 -LOGFILE=~/Desktop/powereon.command.log +LOGFILE=~/Desktop/poweron.command.log if [[ $USER != "root" ]]; then - echo "This must be run as root" - exit 1 + echo "This must be run as root" + exit 1 fi -sleep $ON_DELAY -TIMESTAMP=$(php -r "echo @date('H:i:s', time() + ${OFF_DELAY});") +sleep ${ON_DELAY} + +TIMESTAMP=$(php -r "echo @date('H:i:s', time() + $OFF_DELAY);") pmset repeat poweron MTWRFSU ${TIMESTAMP} -echo -n $(date "+%d.%m.%y @ %H:%I:%S") >> $LOGFILE -echo " " $(wc -l $LOGFILE) >> $LOGFILE +echo -n $(date "+%d.%m.%y @ %H:%I:%S") >> ${LOGFILE} +echo " " $(wc -l $LOGFILE) >> ${LOGFILE} shutdown -h now |