/ambient

Gracefully suspend BOSH Lite on system sleep

Primary LanguageShellMIT LicenseMIT

Ambient 💊

For a sounder sleep

BOSH Lite tends to die when your machine goes to sleep and wakes up.

Ambient suspends your BOSH Lite VM using vagrant suspend on system sleep, and resumes it on system wake.

Usage

Install with ./install.sh.

This will:

  • brew install sleepwatcher, a daemon that watches for changes to system power management status, and add it to launchctl
  • copy two scripts to ~/.bosh-lite-{sleep|wake}
  • bind these scripts to the sleep/wake hooks that sleepwatcher exposes

Use the uninstall script to remove the tool.

Caveats

If BOSH Lite is already suspended, nothing will happen on system sleep, but your BOSH Lite will be resumed when the system wakes. This may not be what you want.

Making a new GitHub repo called ambien will briefly get your account suspended. Good times!