ljr/local/bin/ljrimport/ljr-stop.sh

13 lines
273 B
Bash
Raw Normal View History

2019-02-05 21:49:12 +00:00
#!/bin/bash
IMPORT_NAME=ljr-import
ipid=`ps -e --format=pid,cmd | grep $IMPORT_NAME | grep -v grep | cut --bytes=1-5`
if [ ! "$ipid" == "" ]; then
echo "LJR::Import found, PID: $ipid; sending shutdown signal."
kill $ipid
else
echo "LJR::Import is not running."
fi