The JSON `status` attribute wasn't being parsed and that caused the rest of the process to fail. I changed it to be like the other JSON parsing (i.e. `entry` and `token`) and it now works.
-p
An $a without quotes is not putting quotes around expanded characters. The quotes around the server reload command get lost in the process.
$@ refers to all arguments, which is a nice way of saying $1 $2 ..., plus it doesn't need updating if we need more arguments.