[Unit] Description=A server providing features for remote-diagnosis for Yunohost servers [Service] Type=simple WorkingDirectory={{ WORKING_DIR }} ExecStart={{ WORKING_DIR }}/venv/bin/python3 yunodiagnoser.py &> server.log ExecStop=/bin/kill `/bin/ps aux | /bin/grep yunodiagnoser.py | /bin/grep -v grep | /usr/bin/awk '{ print $2 }'` [Install] WantedBy=multi-user.target