Add new comment

Why do you need spawn-fcgi if systemd may do it by itself?

You just need munin-cgi-graph.socket
[Unit]
Description=Munin socket

[Socket]
ListenStream=/run/munin/munin-cgi-graph.sock
Accept=false

[Install]
WantedBy=sockets.target

And munin-cgi-graph.service
[Unit]
Description=Munin cgi graphics
After=network.target
Requires=munin-cgi-graph.socket

[Service]
ExecStart=/var/www/cgi-bin/munin-cgi-graph
User=munin
Type=simple
Group=nginx
StandardInput=socket

[Install]
WantedBy=multi-user.target

Thats is all. Systemd creates socket and provides to STDIN of munin script just like FastCGI should do (StandardInput=socket).

It works.

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.