Added patches init-scripts for kill services
[openstack-build/neutron-build.git] / rpm / SOURCES / neutron-mlnx-agent.init
index 4db57c91b6f7977a673574f2927fd7e0453b8f1b..b5e514f37388cfb229df1714f5e95043b23454ac 100644 (file)
@@ -13,6 +13,7 @@ plugin=mlnx-agent
 prog=$proj-$plugin
 exec="/usr/bin/$prog"
 configs=(
+    "/usr/share/$proj/$proj-dist.conf" \
     "/etc/$proj/$proj.conf" \
     "/etc/$proj/plugins/mlnx/mlnx_conf.ini" \
 )
@@ -38,6 +39,11 @@ start() {
 stop() {
     echo -n $"Stopping $prog: "
     killproc -p $pidfile $prog
+    if pgrep $prog &>/dev/null ; then
+        sleep 2
+        pgrep $prog &>/dev/null && \
+        killall $prog
+    fi
     retval=$?
     echo
     [ $retval -eq 0 ] && rm -f $lockfile