how to check when a linux service is restarted code example
Example 1: systemd stop service and start
sudo systemctl enable minetest
Example 2: systemd stop service and start
sudo systemctl start minetest
sudo systemctl enable minetest
sudo systemctl start minetest