trinidad / trinidad_init_services

Run Trinidad as a service (based on Commons-Daemon and JRuby-JSVC)
Other
28 stars 10 forks source link

[linux/init.d]: Use jsvc's -user option instead of sudo su to start jsvc #21

Open fpauser opened 12 years ago

fpauser commented 12 years ago

[..] Jsvc is a daemon process so it should be started as root and the -user parameter allows to downgrade to an unprivilegded user. [..]

As issues #12 and #16 could be fixed in jsvc-1.0.10. See https://issues.apache.org/jira/browse/DAEMON-242 and discussion in #20.

kares commented 12 years ago

we're bundling 1.0.10 I've compiled and tried to verify if the isssue got fixed but somehow with no luck:

thus it's still very confusing, tested on Ubuntu 11.10 32-bit (3.0.0-17-generic-pae) as far as I remember it was not-working but printing something else on Debian GNU/Linux 6.0.1 (squeeze)

I previously thought we can do a check using a dummy daemon executable during the configuration, but the second case which is most likely to be the main scenario makes it kind of indistinguishable from a successful daemon start.

ansel1 commented 12 years ago

I've also resorted to using the RUN_USER/sudo, but ran into another problem: I'm not seeing how to set the environment for trinidad. the sudo call in /etc/init.d/trinidad wipes out any existing env I set up.