Issue
I'm trying to create a service script for a Java application I have but I keep getting the below error. I've no idea what's going on because I've provided the absolute path in all areas possible.
07:57:17 executive systemd[1]: [/usr/lib/systemd/system/my_java_app.service:14] Missing '='. Aug 14 07:57:33 executive systemd[1]: [/usr/lib/systemd/system/my_java_app.service:7] Executable path is not absolute, ignoring:..._app.jar Aug 14
Here is my current service script with with absolute paths in place:
[Unit] Description=my_java_app
After=syslog.target After=network.target
[Service]
ExecStart=/usr/java/jre1.8.0_45/bin/java -jar /opt/my_java_app.jar
Type=simple
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOFs
I'm no Linux expert so any help is greatly appreciated.
Solution
Silly error on my behalf.
It was complaining about the EOF string at the end of the script. I thought this was needed by systemd service scripts but evidently it's not.
Very misleading error message but hopefully helps somebody else.
Answered By - Schokea Answer Checked By - David Marino (WPSolving Volunteer)