File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2+ # Author: http://brablc.com/
3+ # Repo: https://github.com/brablc/clit/blob/master/tmutil-safe-nas-backup
4+ #
5+ # Requirements: NoSleepCtrl from http://code.google.com/p/macosx-nosleep-extension/issues/detail?id=28#c8 - take Volanins built (see the issue)
26
37function tmrunning() {
48 return $( [ $( tmutil currentphase) != ' BackupNotRunning' ])
@@ -29,7 +33,7 @@ function tmrun() {
2933 tmutil startbackup
3034 echostate -n I " Waiting for backup to come up ... "
3135
32- MAXWAIT=60
36+ MAXWAIT=180
3337 for I in ` seq 1 $MAXWAIT ` ; do
3438 if tmrunning; then
3539 break ;
@@ -51,13 +55,13 @@ function tmrun() {
5155 sleep 10
5256 done
5357
54- if [ $HASNOSLEEP ]; then
55- echostate I " Returning NoSleep to original state."
56- NoSleepCtrl -s $NOSLEEPSAVESTATE
57- fi
58-
5958 echostate I " Finished backup."
6059 fi
60+
61+ if [ $HASNOSLEEP ]; then
62+ echostate I " Returning NoSleep to original state."
63+ NoSleepCtrl -s $NOSLEEPSAVESTATE
64+ fi
6165}
6266
6367if tmrunning; then
You can’t perform that action at this time.
0 commit comments