in the 3.5.2 shell release, we added the ability to achieve what you are asking for using "-" to precede the parameters of the java application: https://sourceforge.net/tracker/?func=detail&aid=3017567&group_id=39428&atid=425190
this basically works for calling the shell binary directly, but for a shell script you can easily achieve this by modifying it a bit:
open the script and in the console (), start () (and optionally launchdinternally ()) set command_line to the following:
COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=\"$APP_NAME\" wrapper.pidfile=\"$PIDFILE\" wrapper.name=\"$APP_NAME\" wrapper.displayname=\"$APP_LONG_NAME\" $ANCHORPROP $STATUSPROP $LOCKPROP $@ "
Note the $@ at the end.
go to the end of the script where it decides which function it should call (console, start, stop, restart, etc.).
in 'console', 'start' (and 'launchdinternal') set the shift and pass parameters from the command line to the function:
'console') checkUser touchlock $1 shift console $@ ;; 'start') if [ "$DIST_OS" = "macosx" -a -f "/Library/LaunchDaemons/${APP_PLIST}" ] ; then macosxstart else checkUser touchlock $1 shift start $@ fi ;;
.. 'Launchdinternal')
shift launchdinternal $@ ;;
after that you can call the script as follows:
./script start | console - para1 para2 ...
Hope this helps you.
amuses, christian
source share