I would like to know whats the best way to call a REST web service when a Linux server is shutting down.
For Debian/Ubuntu based linux distros just;
Write a script, give it a name i.e. all_hail_lord_cthulu.sh in the the example below, then run;
For RHEL based linux distros it's a bit more flexible/complex - have a look HERE