1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00
openmptcprouter-feeds/luci-app-packet-capture/root/usr/libexec/packet_capture_stop
Ycarus (Yannick Chabanois) 93694b5983 Add luci-app-packet-capture
2020-12-09 14:53:48 +01:00

9 lines
179 B
Bash
Executable file

#!/bin/sh
pid=$(cat /var/run/packet_capture.pid)
if [ -n "$pid" ] && grep -sq packet_capture "/proc/$pid/cmdline"; then
ppid=$(pgrep -P $pid)
kill -TERM $ppid
fi
exit 0