Implemented shutdown scripts for all supported instances

The shutdown script is called when an instance reboots or powers off.
The script may be killed if it runs for over two minutes.
Quotes around ```"$(...)"```. Quotes inside ```$(...)``` are tracked separately from outside. So:
```sh
log "$(<"${logfile}")"
```

In the specific case of how this script's log() function works, it probably doesn't make a difference. Probably. Still good to use quotes unless you know you don't want them.