I use Chrome Remote Desktop service to connect from my Chromebook to my main laptop. However, there is a problem: whenever I put my laptop to sleep, I need to restart the service manually.

I added the following script to /usr/lib/pm-utils/sleep.d as 99ZZZ_chrome_remote (the weird naming is to ensure that this script is executed last on wake):

#!/bin/bash

case "$1" in
 resume)
     sudo service chrome-remote-desktop restart
esac

And it seems to work now. Remember to chmod the script!