Ho installato sleepwatcher usando Homebrew. Tutto ha funzionato bene come sembra, ecco l'output:
josh@Macbuech:~/Documents/Work/Access4All/projects/a4aa2/src$ brew install sleepwatcher
==> Downloading https://homebrew.bintray.com/bottles/sleepwatcher-2.2.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring sleepwatcher-2.2.el_capitan.bottle.tar.gz
==> Caveats
For SleepWatcher to work, you will need to read the following:
/usr/local/Cellar/sleepwatcher/2.2/ReadMe.rtf
Ignore information about installing the binary and man page,
but read information regarding setup of the launchd files which
are installed here:
/usr/local/Cellar/sleepwatcher/2.2/de.bernhard-baehr.sleepwatcher-20compatibility-localuser.plist
/usr/local/Cellar/sleepwatcher/2.2/de.bernhard-baehr.sleepwatcher-20compatibility.plist
These are the examples provided by the author.
To have launchd start sleepwatcher now and restart at login:
brew services start sleepwatcher
==> Summary
🍺 /usr/local/Cellar/sleepwatcher/2.2: 8 files, 53.3K
Volevo eseguire il servizio come suggerito nell'output, ma ho ottenuto il seguente errore:
josh@Macbuech:~/Documents/Work/Access4All/projects/a4aa2/src$ brew services start sleepwatcher
==> Tapping homebrew/services
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-services'...
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 7 (delta 0), reused 4 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
Checking connectivity... done.
Tapped 0 formulae (32 files, 46.4K)
Error: Formula `sleepwatcher` not installed, #startup_plist not implemented or no plist file found
josh@Macbuech:~/Documents/Work/Access4All/projects/a4aa2/src$
Non sono sicuro ora. Mi sono perso qualcosa di importante? Ho letto il README ma mi confonde, non ho esperienza con launchd, demoni, servizi ...
Voglio che sleepwatcher funzioni sempre sul mio computer in modo che venga eseguito ~/.sleep
e ~/.wakeup
quando vada a dormire o svegliarsi.
Aggiornare
Mi sono assicurato che brew service
fosse disponibile, ma non l'ho fatto funzionare.
josh@Macbuech:~/Documents/Work/MuheimWebdesign/tests/tilt$ brew tap homebrew/services
josh@Macbuech:~/Documents/Work/MuheimWebdesign/tests/tilt$ brew services start sleepwatcher
Error: Formula `sleepwatcher` not installed, #startup_plist not implemented or no plist file found