but the reboot command sent as a linux command does not reply before the reboot occurs, and handling the curl errors in this case is a pain. Is there an existing command that replies before the reboot occurs?
This call utilizes UBUS interface, which can be used to control most of the device functions. To get all possible UBUS calls, run the following command:
ubus -v list
And the ubus calls can be performed by specifying the UBUS sub-system and the command, followed by the arguments: