Thanks for the suggestion @jota but I required the script to be run from a REST endpoint. To accomplish this I made my script executable via
sudo chmod u+x /path/to/script.sh
and then I added the following line to my /etc/sudoers.tmp (via sudo visudo)
daemon ALL=NOPASSWD: /path/to/script.sh
This allows me to run the script as sudo from my WP module.