I am working on a Discord Bot, that uses the Spring Boot Framework. I was thinking for the occasional automated and manual reboots and maintenance, that once it receives a kill signal, it send perform an action, such as notifying uses of it shutting down, before it having the application killed.
So how can I handle a KILL sig in Java. I use a Raspbin OS on a Raspberry Pi atm, but that may change to an Amazon Linux OS in the near future.