hlr.c: properly terminate the process on SIGTERM

As per the systemd.kill manual, when a service is going to be
stopped by systemd, the process will first be terminated via
SIGTERM. If then, after a delay, processes still remain, the
the termination request is repeated with the SIGKILL.

It was observed that osmo-hlr immediately terminates on SIGTERM,
leaving the SQLite database open. As a result, several temporary
files (such as hlr.db-shm, hlr.db-wal) remain, allowing the
further recovery:

  DDB ERROR <0001> db.c:86 (283) recovered 10 frames from WAL file

Let's properly handle SIGTERM in the same way as we handle SIGINT.

Change-Id: I1a4a48b95bbaed74ff5a03fb5797a44bdb1fcd3a
1 file changed