I have a systemd file to start a jar file. But I want to execute jar file as *.jar
. Is there a way to do this?
[Unit]
Description=Test Background
[Service]
ExecStart=/usr/bin/java -jar /var/www/test.com/*.jar
Type=simple
WorkingDirectory=/var/www/test.com
[Install]
WantedBy=multi-user.target
I tried this but not working.
From
man 5 systemd.service
(section "Command Lines"):And:
Wildcards are not mentioned as being supported, so you'll have to wrap that command in
/bin/sh -c
or/bin/bash -c
like in the above example.