title: Why does my Erlang boot script work from console but does not work when run from init system (sysvinit, upstart, systemd)?
body: <p>I have an Erlang boot script that I can launch like this:</p>
  
  <pre><code>/usr/bin/erl -boot /path/to/my-boot-script
  </code></pre>
  
  <p>It works when run from console, but fails without any error messages when I run it from systemd. The systemd unit file looks like this:</p>
  
  <pre><code>[Unit]
  Description=My daemon written in Erlang
  
  [Service]
  Type=simple
  ExecStart=/usr/bin/erl -boot /path/to/my-boot-script
  Restart=always
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>The log shows that the system boots properly and then terminates abruptly without any kind of error message. What the hell is going on?</p>