ShinyProxy as daemon

In order to make it easier to daemonize the ShinyProxy jar with SysVinit or Systemd, we could build the jar to be directly executable by adding a configuration setting in pom.xml:

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <executable>true</executable>
    </configuration>
</plugin>

This would make it easy to create a systemd unit configuration like this:

[Unit]
Description=ShinyProxy
After=syslog.target

[Service]
ExecStart=/path/to/shinyproxy.jar

[Install]
WantedBy=multi-user.target

This would enable automatic startup on reboot and allow the user to start/status/stop the service with the ‘service’ command. I’m by no means a Spring or Java expert, so I don’t know if there is a downside to this approach, but I think it would be a nice feature.

Many thanks for the suggestion @maarten-vermeyen - very useful!

@fmichielssen: any thoughts?

Best,
Tobias

Yes, that looks like a useful feature.
According to Spring docs:

Not all tools currently accept this format so you may not always be able to use this technique.

But I don’t know of any tools that would fail on this…