Skip to main content
Fix simple mode with two processes
Source Link
lupguo
  • 131
  • 4
[Unit] Description=ngrokd server [Service] Type=simpleType=forking User=ngrok Group=ngrok ExecStart=/bin/sh -c '/usr/local/ngrok/bin/ngrokd \ -tlsCrt /usr/local/ngrok/tls/srv-ngrok.cert \ -tlsKey /usr/local/ngrok/tls/srv-ngrok.key \ -domain="ioio.cool" \ -httpAddr=:8480 \ -httpsAddr=:8433 \ -tunnelAddr=:8422 >> /var/log/ngrokd.log 2>&1'2>&1 &' Restart=always KillMode=process [Install] WantedBy=multi-user.target 

You can see man systemd.exec, search keywords StandardOutput, and man systemd.service, serach keywords COMMAND LINES

This syntax is intended to be very similar to shell syntax, but only the meta-characters and expansions described in the following paragraphs are understood. Specifically, redirection using "<", "<<", ">", and ">>", pipes using "|", running programs in the background using "&", and other elements of shell syntax are not supported.

[Unit] Description=ngrokd server [Service] Type=simple User=ngrok Group=ngrok ExecStart=/bin/sh -c '/usr/local/ngrok/bin/ngrokd \ -tlsCrt /usr/local/ngrok/tls/srv-ngrok.cert \ -tlsKey /usr/local/ngrok/tls/srv-ngrok.key \ -domain="ioio.cool" \ -httpAddr=:8480 \ -httpsAddr=:8433 \ -tunnelAddr=:8422 >> /var/log/ngrokd.log 2>&1' Restart=always KillMode=process [Install] WantedBy=multi-user.target 

You can see man systemd.exec, search keywords StandardOutput, and man systemd.service, serach keywords COMMAND LINES

This syntax is intended to be very similar to shell syntax, but only the meta-characters and expansions described in the following paragraphs are understood. Specifically, redirection using "<", "<<", ">", and ">>", pipes using "|", running programs in the background using "&", and other elements of shell syntax are not supported.

[Unit] Description=ngrokd server [Service] Type=forking User=ngrok Group=ngrok ExecStart=/bin/sh -c '/usr/local/ngrok/bin/ngrokd \ -tlsCrt /usr/local/ngrok/tls/srv-ngrok.cert \ -tlsKey /usr/local/ngrok/tls/srv-ngrok.key \ -domain="ioio.cool" \ -httpAddr=:8480 \ -httpsAddr=:8433 \ -tunnelAddr=:8422 >> /var/log/ngrokd.log 2>&1 &' Restart=always KillMode=process [Install] WantedBy=multi-user.target 

You can see man systemd.exec, search keywords StandardOutput, and man systemd.service, serach keywords COMMAND LINES

This syntax is intended to be very similar to shell syntax, but only the meta-characters and expansions described in the following paragraphs are understood. Specifically, redirection using "<", "<<", ">", and ">>", pipes using "|", running programs in the background using "&", and other elements of shell syntax are not supported.

Source Link
lupguo
  • 131
  • 4

[Unit] Description=ngrokd server [Service] Type=simple User=ngrok Group=ngrok ExecStart=/bin/sh -c '/usr/local/ngrok/bin/ngrokd \ -tlsCrt /usr/local/ngrok/tls/srv-ngrok.cert \ -tlsKey /usr/local/ngrok/tls/srv-ngrok.key \ -domain="ioio.cool" \ -httpAddr=:8480 \ -httpsAddr=:8433 \ -tunnelAddr=:8422 >> /var/log/ngrokd.log 2>&1' Restart=always KillMode=process [Install] WantedBy=multi-user.target 

You can see man systemd.exec, search keywords StandardOutput, and man systemd.service, serach keywords COMMAND LINES

This syntax is intended to be very similar to shell syntax, but only the meta-characters and expansions described in the following paragraphs are understood. Specifically, redirection using "<", "<<", ">", and ">>", pipes using "|", running programs in the background using "&", and other elements of shell syntax are not supported.