Code: Select all
ping_success=os.execute('ping -c1 -w1 ' .. ip)
Running manually (./domoticz) it does execute the ping.
The service is configured like this:
Code: Select all
[Unit]
Description=domoticz_service
After=network.target
[Service]
User=username
Group=username
ExecStart=/home/username/domoticz/domoticz -www 8080
WorkingDirectory=/home/username/domoticz
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
Restart=on-failure
RestartSec=1m
KillMode=process
#StandardOutput=null
[Install]
WantedBy=multi-user.target