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?
guus
September 30, 2005, 6:38am
2
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
jive-messengerd
chkconfig: 2345 20 80
description: Used to start and stop the jive messenger XMPP server
Script used to start jive messenger as daemon
The script has currently been tested on Redhat Fedora Core 3,
but should theoretically work on most UNIX like systems
before running this script make sure $MESSENGER_HOME/bin/messenger is
executable by the user you want to run messenger as
(chmod +x $MESSENGER_HOME/bin/messenger)
This script should be copied into /etc/init.d and linked into
your default runlevel directory.
You can find your default runlevel directory by typing:
grep default /etc/inittab
Link to the directory like follows
cd /etc/rc.d
ln -s …/init.d/jive-messengerd $90jive-messengerd
Set this to tell this script where messenger lives
If this is not set the script will look for /opt/jive_messenger, then /usr/local/jive_messenger
#export MESSENGER_HOME=
If there is a different user you would like to run this script as,
change the following line
export MESSENGER_USER=jive
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
guus
September 30, 2005, 6:50am
4
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
guus
September 30, 2005, 7:03am
6
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.
guus
September 30, 2005, 7:13am
8
?!
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
guus
September 30, 2005, 7:22am
10
Also make sure there’'s no space or linebreak before #!/bin/sh part.
guus
September 30, 2005, 7:25am
11
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
guus
September 30, 2005, 7:39am
13
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
guus
September 30, 2005, 7:56am
16
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
guus
September 30, 2005, 8:13am
17
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
guus
September 30, 2005, 8:20am
19
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