Hi Mike,
I am assuming you are on a Non Windows OS, as on Windows all the related CI & Apps would have come in MMC ans would have been managed there. Here as Yuksel mentioned you can use sapcontrol utility for doing the same. You can create a script with below details:
1. SSH to the remote host
2. Navigate to the kernel directory
3. Run the sapcontrol utility to stop the DI first
4. Run the sapcontrol utility to stop the CI & DB
5 Run the sapcontrol utility to start the CI & DB first
6. Run the sapcontrol utility to start the DI
Thanks,
Manas