Restart systemd service on file change?
If you mean to reload systemd, scanning for new or changed units then add:
sudo systemctl daemon-reload
- open
sudo visudo
- add
gitlab-runner ALL=(ALL) NOPASSWD: /bin/systemctl restart myapp
- now you can do
sudo /bin/systemctl restart myapp
and it will not prompt for password