actually check if oidc-agent is still running
@@ -48,7 +48,7 @@ if [[ "$1" == "kill" || "$1" == "stop" ]]; then
fi
if [[ "$1" == "start-from-x" ]]; then
if [ "x${START_AGENT_WITH_XSESSION}" == "xTrue" ]; then
- if [ -f "${PID_FILE}" ]; then
+ if [ -f "${PID_FILE}" ] && kill -0 $($CAT $PID_FILE) 2>/dev/null; then
echo_vars
else
start
@@ -57,7 +57,7 @@ if [[ "$1" == "start-from-x" ]]; then
exit
fi
if [[ "$1" == "start" ]]; then
- if [ -f "${PID_FILE}" ]; then
+ if [ -f "${PID_FILE}" ] && kill -0 $($CAT $PID_FILE) 2>/dev/null; then
echo "$ECHO 'It seems like oidc-agent-service already started an oidc-agent
for you.' >&2;
$ECHO 'Run \"oidc-agent-service stop\" to stop that agent or' >&2;
