Daemonizing Jetty?
Cantor, Scott
cantor.2 at osu.edu
Thu Jul 30 15:14:12 EDT 2015
On 7/30/15, 3:01 PM, "users on behalf of Wessel, Keith" <users-bounces at shibboleth.net on behalf of kwessel at illinois.edu> wrote:
>Thanks, Dave, but shoulda mentioned an essential fact in my original note: this is a non-root installation. We’re not on a system-based distro yet (RHEL 6), and een if we were, this all needs to be done with things not requiring root. The jetty.sh script is nice enough to check and do its thing without start-stop-daemon if we aren’t root, but it’s still using lazy backgrounding.
I use a very customized script to do it using the jetty --dry-run option to capture the command line and I use the setuid extension. I haven't come up with a systemd equivalent yet, but my script does work on both RH5 and RH7.
I will get it into the wiki when I can, it was on my list to add to the Jetty docs because it's not trivial.
Whether it's 100% necessary anymore I can't say. When I did it, getting setuid to work required all of it, as did getting Java system properties set. Jetty's probably better now, but I haven't gone back and reworked it.
I have never used their jetty.sh script. The core command, and it does daemonize as far as I knew, is just running java -cp start.jar. It's when you need setuid and stuff like that that it gets more complex.
So I guess as a starting point, stop using jetty.sh?
-- Scott
More information about the users
mailing list