You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create very simple systemd service file in /etc/systemd/system/foo.service to start the program by the launch script (start) created by pack:
[Service]
ExecStart=/opt/foo/bin/start
Start the service: systemctl start foo
The service won't start and the following will appear in journal (journalctl -n20):
Nov 05 20:50:26 myhost systemd[291]: foo.service: Failed to execute command: Exec format error
Nov 05 20:50:26 myhost systemd[291]: foo.service: Failed at step EXEC spawning /opt/foo/bin/start: Exec format error
The problem is that the first line of the launch script is empty line. I think systemd is being correct (and perhaps strict) here. The shebang line should be the first line in the file.
Create very simple systemd service file in
/etc/systemd/system/foo.service
to start the program by the launch script (start
) created by pack:Start the service:
systemctl start foo
The service won't start and the following will appear in journal (
journalctl -n20
):The problem is that the first line of the launch script is empty line. I think systemd is being correct (and perhaps strict) here. The shebang line should be the first line in the file.
Perhaps the fix could be something like this?
The text was updated successfully, but these errors were encountered: