Run plist on wake

404 views Asked by At

I've been searching all over and found options at launchd site. Is there a way to launch a .plist on machine wake? If this is not possible is there a way to run a shell script without installing another package and just use plain shell?

1

There are 1 answers

0
JohnnyQ On BEST ANSWER

At first it didn't work on my OSX Sierra mac. After restarting my machine the plist configuration seems to work now.

<key>RunAtLoad</key>
<true/>

This key makes sure that your plist runs at wake and if you want to specify which script it will run you can do so by

<dict>
    <key>PathState</key>
    <dict>
        <key>/path/to/your/shell/script.sh</key>
        <true/>
    </dict>
</dict>