[Unit] Description=testapp-backend [Service] User=jarservice Environment=REPORT_PATH=/var/testapp/reports Environment=LOG_PATH=/var/testapp/logs Restart=always ExecStart=/usr/bin/java \ -Dmyserver.basePath='/home/jarservice/' \ -Dmyserver.bindAddr='127.0.0.1' \ -Dmyserver.bindPort='8080' \ -Dmyserver.hostName='testapp' \ -jar '/home/jarservice/testapp.jar' SuccessExitStatus=143 [Install] WantedBy=multi-user.target