You are not logged in.

#1 2005-11-06 01:33:40

sud_crow
Member
From: Argentina
Registered: 2003-06-30
Posts: 546
Website

how to start Jive Jabber server as a daemon?

Hi,
Im running a Jive Messenger server, and i cant get it to start as a service with the provided script.

Here is some background:

Its a java based server, i decompressed it to /opt.
To start the server i run /opt/jive/bin/messenger start

There is a script in /opt/jive/bin/extra called: jive-messegerd

Here are the instructions included in the script:

# 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<num>.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

As you  can see, there are a few differences between FC and Arch run levels directories.
As in Arch we dont have runlevel directories, i did the following:
I copied the file to /etc/rc.d/ and added it to rc.conf after all the other daemons... Its not working.

Any ideas on how to do it?

Any help would be really appreciated!
Thanks!

Edit: Updated done steps


Leonardo Andrés Gallego
www.archlinux-es.org || Comunidad Hispana de Arch Linux

Offline

#2 2005-11-06 12:56:46

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: how to start Jive Jabber server as a daemon?

I'm guessing you've used the binary download, right? Why not build it from source? You'd have more control over where everything goes.

Also, I wouldn't put it in /opt - /usr would be fine.

In the meantime, a short-term workaround would be to put that start command in /etc/rc.local.

Offline

#3 2005-11-07 04:28:17

sud_crow
Member
From: Argentina
Registered: 2003-06-30
Posts: 546
Website

Re: how to start Jive Jabber server as a daemon?

Hi!
Yep, i used the binary, as its java, i didnt see the need to build it, its working just fine though, the only thing i dont know how to do is set it up as a service.

I used /opt because i throw everything there, Arch uses it for some pkgs, so i didnt see a problem with that... and i like to keep most of the things in the same place. Is there a problem with that? i mean, can have some bad consecuencies?

I will check rc.local, thanks for the tip!


Leonardo Andrés Gallego
www.archlinux-es.org || Comunidad Hispana de Arch Linux

Offline

#4 2005-11-07 06:47:18

sud_crow
Member
From: Argentina
Registered: 2003-06-30
Posts: 546
Website

Re: how to start Jive Jabber server as a daemon?

Hi, i tryed the /etc/rc.local thing, but i got a problem, as the server is java based, it needs a running JVM, and at system startup there is none....

Any ideas on how to solve this?

I was hoping someone could tell me how to adapt the runlevels thing, so i could use the provided script...


Leonardo Andrés Gallego
www.archlinux-es.org || Comunidad Hispana de Arch Linux

Offline

#5 2005-11-07 10:03:11

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: how to start Jive Jabber server as a daemon?

sud_crow wrote:

I used /opt because i throw everything there, Arch uses it for some pkgs, so i didnt see a problem with that... and i like to keep most of the things in the same place. Is there a problem with that? i mean, can have some bad consecuencies?

No bad consequences - it's just not the Arch way. Arch uses /opt for large suites of software, like gnome, kde, mozilla, etc. Anything smaller goes in /usr. It's your choice, though, at the end of the day.

sud_crow wrote:

I was hoping someone could tell me how to adapt the runlevels thing, so i could use the provided script...

Alright, alright... smile

You're right to put it in /etc/rc.d, you just need some changes to the script itself. The script exports two variables at the start - MESSENGER_HOME and MESSENGER_USER (MESSENGER_HOME is commented by default). If you leave them as they are, the script will look for /opt/jive_messenger first, then/usr/local/jive_messenger, and then will try to run the program as user 'jive'. If I'm not mistaken, you've put it in /opt/jive, as per your first post, and I'm going to take a guess that you have not created user 'jive'.

So - change

#export MESSENGER_HOME=

to

export MESSENGER_HOME=/opt/jive

and change

export MESSENGER_USER=jive

to

export MESSENGER_USER=<your_user_name>

or else create the 'jive' user.

Let us know how it goes.

Offline

Board footer

Powered by FluxBB