#/bin/bash if systemctl is-active __APP__.service --quiet; then systemctl stop monitorix.service sleep 1 pkill -f "monitorix-httpd listening on" || true systemctl start __APP__.service fi