Skip to content
Snippets Groups Projects
Commit 1d446e77 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

more strict check for currently running instance

parent 7445c261
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,8 @@ IDC_svcathost__cachefile="${dir_data}/services_on_host__at-director.txt"
# local MY_OSName=`facter os -y | grep " distid:" | cut -f 2 -d ":" | cut -f 2 -d " " | tr '[:upper:]' '[:lower:]'`
# local MY_OSMajorVersion=`facter os -y | grep " majdistrelease:" | cut -f 2 -d ":" | cut -f 2 -d "'"`
local MY_Platform=`facter kernel | tr '[:upper:]' '[:lower:]'`
# local MY_Platform=`facter kernel | tr '[:upper:]' '[:lower:]'`
local MY_Platform=`uname -a | cut -f 1 -d ' '`
. `dirname $0`/plugins/inc_pluginfunctions
local MY_OSName=`ph.getOS`
local MY_OSMajorVersion=`ph.getOSMajor`
......
......@@ -101,7 +101,7 @@ function loopChecks(){
local snapShotCurrent=${dir_data}/`basename $0`-last.fingerprint
if [ -f "${lockfile}" ]; then
local lockpid=`cat "${lockfile}" | cut -f 2 -d "-" | cut -f 4 -d " " | grep "[0-9]"`
ps -f --pid $lockpid >/dev/null
ps -f --pid $lockpid | grep "`basename $0`" | grep loop >/dev/null
if [ $? -eq 0 ]; then
_log "ABORT: Loop seems to run already. See process with PID $lockpid"
echo
......
plugins @ ee916f18
Subproject commit 7591e7456609b9313937662bfce4823669f60eda
Subproject commit ee916f183663f7a694490cf91ea6f0c3d64b59bf
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment