Using Mule 2.2.1 CE on CentOS 5.3.
I am now using a modified version of $MULE_HOME/bin/mule
script, in which I set RUN_AS_USER variable to a non-root user
and it is working great (because of help I got from this list, thanks!).
One thing I noticed is that with this modified script, I am no longer
able to specify which config.xml to use on the command line:
# $MULE_HOME/bin/mule_run_as_version start -config my.xml
mule ignores my.xml and resorts to the default mule-config.xml.
Does this happen only to me because I made some mistake when
editing? Or is this a bug in the original script? If so, how do I fix
this?
Thanks in advance.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
> I am now using a modified version of $MULE_HOME/bin/mule
> script, in which I set RUN_AS_USER variable to a non-root user
> and it is working great (because of help I got from this list, thanks!).
>
> One thing I noticed is that with this modified script, I am no longer
> able to specify which config.xml to use on the command line:
Seems to be a bug. Could you try the following patch?
I don't test it by myself.
--- mule.orig 2008-07-06 23:03:20.000000000 -0700
+++ mule 2009-09-10 19:17:31.671875000 -0700
@@ -398,7 +398,8 @@
# Still want to change users, recurse. This means that the user will only be
# prompted for a password once. Variables shifted by 1
- su -m $RUN_AS_USER -c "\"$REALPATH\" $2"
+ ARGS=`echo $* | sed -e 's/^[^[:blank:]]*[[:blank:]]*//'`
+ su -m $RUN_AS_USER -c "\"$REALPATH\" $ARGS"
# Now that we are the original user again, we may need to clean up the lock file.
if [ "X$LOCKPROP" != "X" ]
@@ -613,35 +614,35 @@
case "$1" in
'console')
- checkUser touchlock $1
+ checkUser touchlock $*
checkAdditionalJvmParams $*
console
;;
'start')
- checkUser touchlock $1
+ checkUser touchlock $*
checkAdditionalJvmParams $*
start
;;
'stop')
- checkUser "" $1
+ checkUser "" $*
stopit
;;
'restart')
- checkUser touchlock $1
+ checkUser touchlock $*
stopit
start
;;
'status')
- checkUser "" $1
+ checkUser "" $*
status
;;
'dump')
- checkUser "" $1
+ checkUser "" $*
dump
;;
--
Yuji Yamano
OGIS International, Inc.