2

Ubuntu 18.04

foundry-error.service

[Unit]
Description= /home/man/errorpage/error_pages.js - User errorpage.
Documentation=https://blah.com
After=network.target

[Service]
Environment=NODE_PORT=%i

Type=simple
User=man
ExecStart=/usr/bin/node /home/man/errorpage/error_pages.js
Restart=on-failure

[Install]
WantedBy=multi-user.target

I try to pass the port to the start up.

systemctl start foundry-error@8000
systemctl start foundry-error@8000.service
systemctl start foundry-error.service@8000

All of these iterations come back with "Unit ... not found." So I am not sure how to pass the port # in as I need to pass in 3 different ports. I have done this from root, and from sudo man. All to the same issue.

Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83
Daxcor
  • 83

1 Answers1

1

The service file should be named foundry-error@.service. Yours is missing the at sign. Also, make sure it is in the correct directory (usually /etc/systemd/system/).

The first two ways of invoking the service are correct. The last one is invalid.

JayEye
  • 1,033