[vox-tech] Strange server behavior
Richard Crawford
vox-tech@lists.lugod.org
Wed, 23 Apr 2003 15:19:37 -0700 (PDT)
Here's the script:
#!/sbin/sh
export JAVA_HOME=/usr/java
export J2EE_HOME=/usr/j2ee
export JRUN_HOME=/space/usr/jrun
case "$1" in
start)
cmdtext="starting"
export jrun_params="admin default"
echo "jrun $cmdtext, using servers: ${jrun_params}"
;;
stop)
cmdtext="stopping"
echo "jrun $cmdtext"
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
/usr/bin/su cfusion -c "${JRUN_HOME}/bin/jrun $1 $jrun_params 2>&1
1>${JRUN_HOME}/logs/bootup.log &"
Not much to it. And I transcribed the last line wrong earlier.
> On Wed, Apr 23, 2003 at 02:50:05PM -0700, Richard Crawford wrote:
>> > Check how they are called in the init.d script with the argument of
>> "start", and compare it with how you invoke it manually.
>>
>> As far as I can tell, they're the same.
>>
>> >From the command line, I do (as user cfusion)...
>>
>> $ /space/usr/jrun/bin/jrun start admin
>>
>> In the script, it's
>>
>> /usr/bin/su cfusion "${JRUN_HOME}/bin/jrun $1 $jrun_params 2>&1
>>
>> where $JRUN_HOME = /space/usr/jrun and $jrun_params = admin.
>
> ... I would still really like to see the actual scripts.
>
>> /usr/bin/su cfusion "${JRUN_HOME}/bin/jrun $1 $jrun_params 2>&1
>
> even if you correct this command by putting a close double quote... i
> it's not correct. Need a -c, like...
>
> su user -c "command"
>
> --
> GPG key: http://simons-clan.com/~msimons/gpg/msimons.asc
> Fingerprint: 524D A726 77CB 62C9 4D56 8109 E10C 249F B7FA ACBE
--
Slainte,
Richard S. Crawford
AIM: Buffalo2K / Y!: rscrawford / ICQ: 11640404
http://www.mossroot.com http://www.stonegoose.com
"It is only with our heart that we can see clearly. What is essential is
invisible to the eye." --Antoine de Saint Exupery