I am trying to run a wireshark capture as a daemon. I found this init.d script.
it works to start dumpcap, but when I try to use
sudo /etc/init.d/tsharkd stop
I get the following:
/etc/init.d/tsharkd: 44: /etc/init.d/tsharkd: Stopping WireShark packet capture program: dumpcap: not found
The script, tsharkd is has owner and group as root and permissions set as -rwxr-xr-x
If I run the following line (the stop command for the init.d script) manually without sudo, I get the same error
/sbin/start-stop-daemon --stop --signal 18 --quiet --user root --group root --exec /usr/bin/dumpcap >/dev/null && result="running." && exitval=0
If I run the line above with sudo it works. I have even tried editing visudo but still no luck. I also tried adding sudo to the line in the script. Nothing seems to work.