powerbook_blog

klein, praktisch, unverdaulich seit 2004

SleepWatcher

| Keine Kommentare

Wenn ich in meinem Arbeitszimmer sitze, dann habe ich das Buch meist am Netzwerk-Kabel. Abends klappe ich das Buch dann zu, kabel es ab und bewege mich in den Wohnbereich. Sobald ich das Buch wieder aufklappe, jammert OS X dann meist, weil ich vorher vergessen hatte, die SMB-Laufwerke auszuwerfen (zu unmounten).

SleepWatcher [...] is a command line tool (daemon) for Mac OS X that executes a command or shell script when the Mac goes to sleep mode or wakes up from sleep. It also provides a way to put the Mac asleep from the command line. A StartupItem, sample start and sleep scripts and the source code for sleepwatcher are included in the download. A little bit knowledge of the Unix command line is required to benefit from this software.

Und weiter im readme:

To automatically start the sleepwatcher daemon when the Mac boots, you can install the SleepWatcher StartupItem.pkg. Beside the startup item, this package contains the sample scripts /etc/rc.sleep and /etc/rc.wakeup that look in the home directory of every user of the Mac for scripts .sleep and .wakeup (the must be executable: chmod +x) and execute them when the Mac goes to sleep mode respectively wakes up. So every user of the Mac can shedule his/her own housekeeping commands. Feel free to modify /etc/rc.sleep and /etc/rc.wakeup according to your own requirements (but be aware that future updates to the SleepWatcher StartupItem package might overwrite your modifications).

Ja, klasse! Genau dieses kleine und kostenlose Stück Software wird doch mein Problem lösen! Ähnlich wie bei Dobschat lese ich meine aktuelle Umgebung mit scselect aus und unmounte beim Einschlafen bzw. mounte beim Aufwachen.

Prima! Und der Quellcode ist auch noch dabei!

Schreib einen Kommentar

Pflichtfelder sind mit * markiert.