0

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

Zoredache
  • 128,755
  • 40
  • 271
  • 413
mnml
  • 327
  • 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
  • 100,240
  • 9
  • 106
  • 238