Systemd: Example service script
Example service script:
e.g. daphne application server with a django app.
# vi /etc/systemd/system/daphne.service
[Unit] Description=daphne service to run django application After=network.target After=nginx.service [Service] Type=simple User=mik Group=mik WorkingDirectory=/opt/app/ ExecStart=/opt/app/wine-env/bin/daphne djangoapp.asgi:application ExecStop=/bin/kill -s TERM $MAINPID Restart=always [Install] WantedBy=multi-user.target