I was able to create a script that does what I want by combining this guide's script and part of the bash script found in this answer. If you put the script in /etc/init.d
and then change the appropriate vars at the top, this script can be pretty useful. Calling:
service script reload
or
/etc/init.d/script reload
Allows you to have no downtime while the new code loads up. The script can be found here. You just need to download the script, change the variables at the top, do
chmod +x script
and move it into /etc/init.d
, and then you're good to go! :)