[Unit]
Description=Ginxsom Blossom Server
After=network.target

[Service]
Type=forking
ExecStartPre=/bin/rm -f /tmp/ginxsom-fcgi.sock
ExecStart=/usr/bin/spawn-fcgi \
  -s /tmp/ginxsom-fcgi.sock \
  -M 666 \
  -u www-data \
  -g www-data \
  -d /usr/local/bin/ginxsom \
  -- /usr/local/bin/ginxsom/ginxsom-fcgi \
     --admin-pubkey 1ec454734dcbf6fe54901ce25c0c7c6bca5edd89443416761fadc321d38df139 \
     --server-privkey 90df3fe61e7d19e50f387e4c5db87eff1a7d2a1037cd55026c4b21a4fda8ecf6 \
     --db-path /usr/local/bin/ginxsom \
     --storage-dir /var/www/blobs
ExecStop=/usr/bin/pkill -f ginxsom-fcgi
ExecStopPost=/bin/rm -f /tmp/ginxsom-fcgi.sock
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target