0

I would like to know whats the best way to call a REST web service when a Linux server is shutting down.

Zoredache
  • 130,897
  • 41
  • 276
  • 420
mnml
  • 337
  • 1
  • 7
  • 21

1 Answers1

3

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;

update-rc.d -f all_hail_lord_cthulu.sh reboot 90 0 6 .

For RHEL based linux distros it's a bit more flexible/complex - have a look HERE

Chopper3
  • 101,299
  • 9
  • 108
  • 239