From 45cd7bca7e005fbeac7fbadc4270df3b0fc4cfdf Mon Sep 17 00:00:00 2001 From: "Ladue, David (dl3158)" Date: Mon, 10 Sep 2018 18:33:42 -0400 Subject: additional V3 auth and priv options Change-Id: I23e44d497d3f77436d19aed52e8b75d07101956d Issue-ID: DCAEGEN2-630 Signed-off-by: Ladue, David (dl3158) --- snmptrap/snmptrapd.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'snmptrap/snmptrapd.sh') diff --git a/snmptrap/snmptrapd.sh b/snmptrap/snmptrapd.sh index 9338fff..ab70c91 100755 --- a/snmptrap/snmptrapd.sh +++ b/snmptrap/snmptrapd.sh @@ -72,9 +72,11 @@ start_service() # standard startup? Use this: cmd="python ./snmptrapd.py" # want tracing? Use this: - # "python -m trace --trackcalls snmptrapd.py" + # cmd="python ./snmptrapd.py -v" # unbuffered io for logs? Use this: - # "python -u snmptrapd.py" + # cmd="python -u ./snmptrapd.py" + # fmdl: needs further research + # cmd="python -m trace --trackcalls ./snmptrapd.py" cd ${start_dir} @@ -155,13 +157,13 @@ status_service() if [ -r ${pid_file} ] then pid=$(cat ${pid_file}) - pgrep -a python | grep ${current_module} | grep "^${pid}" > /dev/null + pgrep -f ${current_module}.py | grep "^${pid}" > /dev/null return_code=$? if [ ${return_code} -eq 0 ] then log_msg "Status: ${current_module} running\n" - ps -p ${pid} -f | grep -v PID + ps -f -p ${pid} -f | grep -v PID return_code=0 else log_msg "Status: ERROR! ${current_module} not running.\n" -- cgit 1.2.3-korg