bkctld-rm: state the age of the process when killing it
This commit is contained in:
parent
ea140f6137
commit
11bb59831c
|
@ -19,7 +19,9 @@ kill_or_clean_lockfile() {
|
|||
pkill -9 --parent "${pid}"
|
||||
# Kill the parent
|
||||
kill -9 "${pid}"
|
||||
warning "Process ${pid} has been killed. Only one ${0} can run in parallel, the latest wins."
|
||||
# Only one bkctld-rm can run in parallel, the latest wins
|
||||
lockfile_date=$(date --date "@$(stat -c %Y ${lock_file})" +"%Y-%m-%d %H:%M:%S")
|
||||
warning "Process \`${pid}' has been killed (was running since ${lockfile_date})"
|
||||
else
|
||||
warning "Process not found at PID \`${pid}'. Ignoring lock file \`${lock_file}'."
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue