Script to ping computer

Add CAP_NET_RAW to your SystemD service's AmbientCapabilities. That will allow .isReachable() to work in a non-root environment. (I recommend also using CAP_NET_BIND_SERVICE so you can use the standard http and https ports with a non-root service.)

2 Likes