APMIA start script does not remove the pid file
search cancel

APMIA start script does not remove the pid file

book

Article ID: 225723

calendar_today

Updated On:

Products

CA Application Performance Management (APM / Wily / Introscope)

Issue/Introduction

Using force_start when starting the APMIA, two issues usually arise: When starting a second time, the lock-file is not removed. Also, the APMIA script does not handle correctly the HUP signal issued by the docker-server to delete the lockfile.

Environment

APMIA and Unix environments.

Resolution

So - when using scripts, one can set the huponexit value to true. At the same time, make sure the old pid file is deleted.

#!/usr/bin/env bash

shopt -u huponexit

nohup bash -c "rm -f /opt/apmia/bin/apmia.pid && /opt/apmia/apmia-ca-installer.sh force_start" 2>/dev/null &
exit 0

shopt -u huponexit nohup bash -c "rm -f /opt/apmia/bin/apmia.pid && /opt/apmia/apmia-ca-installer.sh force_start" 2>/dev/null & exit 0