On Thu, Jul 07, 2016 at 07:29:20AM -0700, Michael Chavez wrote: > Hello, > > I am a newbie trying to get systemd to load my phoenix/elixir app. > > I have tried many variations of my hello-phoenix service file, the version > that I feel is closest to being correct looks like this: > > [Service] > WorkingDirectory=/home/hello-phoenix/app/bin > ExecStart=/home/hello-phoenix/app/bin/hello_phoenix start > Environment=MIX_ENV=prod PORT=8888 > Restart=always > StandardOutput=syslog > StandardError=syslog > SyslogIdentifier=hello-phoenix > User=hello-phoenix > > after reloading daemon, enabling and starting the hello-phoenix.service, > systemctl status hello-phoenix.service outputs: > > ● hello-phoenix.service - hello-phoenix service > Loaded: loaded (/etc/systemd/system/hello-phoenix.service; enabled) > Active: failed (Result: start-limit) since Thu 2016-07-07 10:14:30 EDT; > 9min ago > Process: 4281 ExecStart=/home/hello-phoenix/app/bin/hello_phoenix start > (code=exited, status=0/SUCCESS) > Main PID: 4281 (code=exited, status=0/SUCCESS) >
Does it fork? If so, you need Type=forking in you [Service] section (default is Type=simple, e.g. application running in foreground). See https://enotty.pipebreaker.pl/2014/10/08/failure-modes-of-incorrect-type-in-systemd-units/ for longer explanation. -- Tomasz Torcz "Funeral in the morning, IDE hacking xmpp: zdzich...@chrome.pl in the afternoon and evening." - Alan Cox _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel