Browse code

[tika] BM-15008 Fix: use systemd to compute the PID and ensure clean restarts on OutOfMemory

Thomas Cataldo authored on 01/07/2019 09:34:39
Showing 1 changed files
... ...
@@ -1,6 +1,6 @@
1 1
 #!/bin/bash
2
-
3
-tikapid=$(cat /var/run/bm-tika.pid)
2
+ 
3
+tikapid=$(systemctl show -p MainPID --value bm-tika.service)
4 4
 echo "$(date) - Killing '${tikapid}'...." >> /var/log/bm-tika/tika.oom.log
5 5
 
6 6
 kill -9 ${tikapid}