Here's some minor modifications:
- Since it listens on a network socket, make it a dependency of
network.target. nohupis not needed sincesystemdwill daemonize the executable for you.- I think a separate shell script would be an overkill, so just merge it into the service file.
So the service file looks like this:
[Unit] Description=Some job After=network.target [Service] WorkingDirectory=/home/user/tmp/testout ExecStart=java -jar /home/user/programming/tests/java/core/SocketTest/SocketTest.jar < /dev/null >/dev/null User=dlt Type=simple [Install] WantedBy=multi-user.target