powered by Jive Software

Help JM start at boot suse 9.3

suse 9.3

JM 2.2.2 new insall

did the fallowing

MESSENGER_HOME/bin/messenger is executable

copied jive-messengerd to /etc/init.d

jive-messengerd is executable

linked jive-messengerd /etc/init.d/rc5.d

problems:

trying to run the script via command line ie: /etc/init.d/jive-messengerd

i get this error

bad interpreter: No such file or directory

trying to start in yast system services (Runlevel) gui i get this error

/etc/init.d/jive-messengerd start returned 126 (unspecified error):

sh: /etc/init.d/jive-messengerd: /bin/sh: bad interpreter: No such file or directory

any ideas?

You seem to be missing something that is called in /etc/init.d/jive-messengerd. It’'s hard to tell what without the script itself though.

here it is this the ine that came in the extra dir in the 2.2.2 rpm

#!/bin/sh

  1. jive-messengerd

  1. chkconfig: 2345 20 80

  2. description: Used to start and stop the jive messenger XMPP server

  3. Script used to start jive messenger as daemon

  4. The script has currently been tested on Redhat Fedora Core 3,

  5. but should theoretically work on most UNIX like systems

  1. before running this script make sure $MESSENGER_HOME/bin/messenger is

  2. executable by the user you want to run messenger as

  3. (chmod +x $MESSENGER_HOME/bin/messenger)

  1. This script should be copied into /etc/init.d and linked into

  2. your default runlevel directory.

  3. You can find your default runlevel directory by typing:

  4. grep default /etc/inittab

  1. Link to the directory like follows

  2. cd /etc/rc.d

  3. ln -s …/init.d/jive-messengerd $90jive-messengerd

  1. Set this to tell this script where messenger lives

  2. If this is not set the script will look for /opt/jive_messenger, then /usr/local/jive_messenger

#export MESSENGER_HOME=

  1. If there is a different user you would like to run this script as,

  2. change the following line

export MESSENGER_USER=jive


  1. If a messenger home variable has not been specified, try to determine it

if ; then

if [ -d “/opt/jive_messenger” ]; then

MESSENGER_HOME="/opt/jive_messenger"

elif [ -d “/usr/local/jive_messenger” ]; then

MESSENGER_HOME="/usr/local/jive_messenger"

else

echo “Could not find Jive Messenger installation under /opt or /usr/local”

echo “Please specify the Jive Messenger installation location in environment variable MESSENGER_HOME”

exit 1

fi

fi

function execCommand() {

OLD_PWD=pwd

cd $MESSENGER_HOME/bin

CMD="./messenger $1"

su -c “$CMD” $MESSENGER_USER &

cd $OLD_PWD

}

start() {

execCommand “start”

}

stop() {

execCommand “stop”

}

case “$1” in

start)

start

;;

stop)

stop

;;

*)

echo “Usage $0 {start|stop}”

exit 1

esac

exit 0

Ah, I see. I’'m running it on Windows, no RPMs for me

Do you have a /bin/sh available?

/bin/sh seems to be where the error is but im new to linux and have no idea how to fix it

Message was edited by:

gandor

on your shell, try this:

which sh

if that gives you any output (other than /usr/sh), try editing the first line of the script to match that output (change the entire line, but keep the #! as the first two characters). So, if ‘‘which sh’’ would give you ‘’/usr/local/bin/sh’’, change the first line of the startup script to: #!/usr/local/bin/sh

If ‘‘which sh’’ doesn’'t give you anything, try ‘‘which bash’’ instead.

which sh returns

/bin/sh

any other ideas ?

Message was edited by:

gandor

Message was edited by:

gandor

?!

Are you sure you made /etc/init.d/jive-messengerd is executable?

You might want to try ‘‘which bash’’ anyways, exchanging the first line to the output of that (if any).

yes /etc/init.d/jive-messengerd is executable i just dubble checked

/bin/bash returns this error

sh: /etc/init.d/jive-messengerd: /bin/bash: bad interpreter: No such file or directory

i dont get it all the other scripts in the /etc/init.d/ that use /bin/sh or /bin/bash are working just fine

Also make sure there’'s no space or linebreak before #!/bin/sh part.

if that doesn’‘t work, we’'ll take it from the top.

Empty that file, and add just these two lines:

#!/bin/sh

echo “hi mom”

save, and execute it. If that doesn’'t give you errors, remove the ‘‘hi mom’’ line, and add the other lines from the original script.

#!/bin/sh

echo “hi mom”

did work so i did as u said and removed the echo “hi mom” and places this into the script lieving out all the connected lines “#”

i get these errors now lol

: command not foundssengerd: line 3:

/etc/init.d/jive-messengerd: line 7: syntax error near unexpected token `elif’’

/etc/init.d/jive-messengerd: line 7: ` elif [ -d “/usr/local/jive_messenger” ];’'then

#!/bin/sh

export MESSENGER_USER=jive

if ; then

if [ -d “/opt/jive_messenger” ]; then

MESSENGER_HOME="/opt/jive_messenger"

elif [ -d “/usr/local/jive_messenger” ]; then

MESSENGER_HOME="/usr/local/jive_messenger"

else

echo “Could not find Jive Messenger installation under /opt or /usr/local”

echo “Please specify the Jive Messenger installation location in environment variable MESSENGER_HOME”

exit 1

fi

fi

function execCommand() {

OLD_PWD=pwd

cd $MESSENGER_HOME/bin

CMD="./messenger $1"

su -c “$CMD” $MESSENGER_USER &

cd $OLD_PWD

}

start() {

execCommand “start”

}

stop() {

execCommand “stop”

}

case “$1” in

start)

start

;;

stop)

stop

;;

*)

echo “Usage $0 {start|stop}”

exit 1

esac

exit 0

ah, we’'re getting somewhere

in your script, change ‘‘elif’’ into ‘‘else if’’

next errors

/etc/init.d/jive-messengerd: line 7: syntax error near unexpected token `else’’

/etc/init.d/jive-messengerd: line 7: ` else if [ -d “/usr/local/jive_messenger”’’]; then

well at liest its doing something now

ok i cut the elif statement its not really needed becouse i set the MESSENGER_HOME= value

now it is getting an error here

''etc/init.d/jive-messengerd: line 16: syntax error near unexpected token `{

''etc/init.d/jive-messengerd: line 16: `function execCommand() {

the script looks like this now

#!/bin/sh

export MESSENGER_HOME=/opt/jive_messenger

export MESSENGER_USER=jive

if ; then

if [ -d “/opt/jive_messenger” ]; then

MESSENGER_HOME="/opt/jive_messenger"

else

echo “Could not find Jive Messenger installation under /opt or /usr/local”

echo “Please specify the Jive Messenger installation location in environment variable MESSENGER_HOME”

exit 1

fi

fi

function execCommand() {

OLD_PWD=pwd

cd $MESSENGER_HOME/bin

CMD="./messenger $1"

su -c “$CMD” $MESSENGER_USER &

cd $OLD_PWD

}

start() {

execCommand “start”

}

stop() {

execCommand “stop”

}

case “$1” in

start)

start

;;

stop)

stop

;;

*)

echo “Usage $0 {start|stop}”

exit 1

esac

exit 0

try this script instead:

#!/bin/sh

export MESSENGER_HOME=/opt/jive_messenger

export MESSENGER_USER=jive

if ; then

if [ -d “/opt/jive_messenger” ]; then

MESSENGER_HOME="/opt/jive_messenger"

else

echo "Could not find Jive Messenger "

echo “installation under /opt or /usr/local”

echo “Please specify the Jive Messenger”

echo “installation location in environment”

echo “variable MESSENGER_HOME”

exit 1

fi

fi

OLD_PWD=pwd

cd $MESSENGER_HOME/bin

case “$1” in

start)

CMD="./messenger start"

;;

stop)

CMD="./messenger stop"

;;

*)

echo “Usage $0 {start|stop}”

exit 1

esac

su -c “$CMD” $MESSENGER_USER &

cd $OLD_PWD

exit 0

/code

Is this fifteen minute break a good sign?

well it seems to be trying to fo something but its hanging up i have to kill the prosess

it returns the error

/etc/init.d/jive-messengerd start returned 0 (success):

testing JVM in /opt/jive_messenger/jre …

./messenger: line 60: /home/jive/.install4j: No such file or directory

Starting messenger

Well, the start script seems to work. The next error is a little out of my league, since I’‘m not running Jive Messenger on linux. I would try to find out where .instal4j lives, but even after finding that, I’'m not sure where to go.

I think it’'s time someone else stepped in here hint, hint

lol ok thanks for trying i’'ll keep working a way

you have a good one