systemd 522 B

1234567891011121314151617181920212223
  1. [Unit]
  2. Description=webshop service
  3. After=network.target
  4. [Service]
  5. Type=simple
  6. Restart=always
  7. RestartSec=1
  8. User=<user>
  9. Group=<user>
  10. WorkingDirectory=<path_to_webshop>
  11. # this makes Python send logs to journalctl right-away, without buffering
  12. Environment="PYTHONUNBUFFERED=1"
  13. # this makes sure git-annex is available in the PATH (/usr/local/bin:/usr/bin:/bin)
  14. Environment="PATH=/usr/local/bin:/usr/bin:/bin:/<path_to_webshop>/env/bin"
  15. ExecStart=/bin/bash <path_to_webshop>server.sh
  16. [Install]
  17. WantedBy=multi-user.target