I can use command sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist
to start TFTP Server on mac. But what is the process name of the running TFTP server?
I tried ps aux | grep tftp
and pgrep tftp
, neither give me anything…
My goal is to use script to track if tftp server has been turned on OR not…
Best Answer
I wrote a script for that purpose if you care to use it. The usage for TFTP would be as follows.
You might be surprised to find that it shows
launchd
instead of the actual TFTP process. The service needs to be running to see the actual TFTP process, andlaunchd
is probably managing that service.I see the question was modified with...
This solution below was working up to Mavericks, 10.9, and probably works up to El Capitan, 10.11.6; but, I have not actually tried it on a Mac with a version higher than 10.9. To disable a service:
It can then be checked:
If the return value is not 'true', then the service is not disabled.