" /> Config Server 8.1 startup script for Linux? - Genesys CTI User Forum

Author Topic: Config Server 8.1 startup script for Linux?  (Read 4191 times)

Offline perryp

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Config Server 8.1 startup script for Linux?
« on: March 27, 2012, 05:41:30 PM »
Advertisement
Hello Everyone,
We are moving our environment from Windows to Linux for various reasons and all seems to be going very well with one minor exception.

Upon installing Config Server, the application doesn't want to play nice when trying to run it via an init script.  Does anyone have any insight on things to look for when running Config Server under Red Hat 5.8 as a script in the rc3.d directory?

What I am experiencing is:
1 - Confserv must be executed from within the working directory (/gcti/confserv_81) (This tells me that something might be going on with $PATH)
2 - Confserv will only run in console mode.  Once I close out, it shuts down.  I know that I can disown the process but I would think that Genesys would have written this so that it can run as a service.
3 - No matter what, I cannot get this process to stay running when excecuted via an init script.

I can't really find any Genesys documentation about startup scripts for Confserv.  Any thoughts or pointers would be greatly appreciated.

Thanks,
Perry

Offline Marco64

  • Newbie
  • *
  • Posts: 22
  • Karma: -1
Re: Config Server 8.1 startup script for Linux?
« Reply #1 on: March 29, 2012, 11:03:55 AM »
Hi Perry

I'm not really familiar with this OS (Red Hat) nor it's rc3.d dir. Per my knowledge this type of OS has different types of inits and from it's number (rc1, rc2 ecc) it depends the start sequence of processes. So if LCA is to be started before you will put it's init script in rc2.d and then DBServer + ConfServ in rc3.d. In this way LCA is up and running before. This is just a sample.

If you are not a SysAdmin I suggest that you simply copy an existing script and then you will change the parameters, it can be a start point and maybe you will solve it.   

About you questions: I have installed several processes over a NIX like environments such as Solaris, HP-UX and even (in test) under Debian. So:

1 - Confserv must be executed from within the working directory (/gcti/confserv_81) (This tells me that something might be going on with $PATH)

I will install it under the user genesys or such. Then in the .profile belongin to this user (in /usr/genesys or equivalent) you can set a specific evironment and a specific PATH. You can see what the evoronment is with the command ENV. Then you can edit the .profile as you need. Or simply you can start it from the absolute path "/gcti/confserv_81/start.sh" or "/gcti/confserv_81/confserv port 2020 ecc. ecc "

2 - Confserv will only run in console mode.  Once I close out, it shuts down.  I know that I can disown the process but I would think that Genesys would have written this so that it can run as a service.

Probably you are running the start.sh in a shell. This is normal but as soon as you log off or try to exit the shell (the father)  or the process output (control C) the system kills the process. Try to run it with "nohup ./start.sh & ". You will simply run nohup before. You can even tail the nohup.log file then, it will be in the same directory.

3 - No matter what, I cannot get this process to stay running when excecuted via an init script.

Try it as in point 2. Then go back to 1 and handle the init script with the proper settings.

hope this helps.

Marco
 

Offline bandorka

  • Full Member
  • ***
  • Posts: 120
  • Karma: 1
Re: Config Server 8.1 startup script for Linux?
« Reply #2 on: March 29, 2012, 07:44:51 PM »
Hi,

Try this, it's not perfect but working on my linux (file: /etc/init.d/confserv):

-------------------------------------------------------------------------------------
#! /bin/sh
#
# Genesys ConfServ init script
#

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/genesys/stcs
DAEMONDIR=/genesys/stcs
DAEMON=/genesys/stcs/confserv
NAME=confserv
DESC="Genesys Configuration Server"

test -x $DAEMON || exit 0

set -e

case "$1" in
  start)
        echo -n "Starting $DESC: "
        cd $DAEMONDIR
        $DAEMON &
        echo "$NAME."
        ;;
  stop)
        echo -n "Stopping $DESC: "
        ps xa | grep $DAEMON | awk {'print $1'} | head -n 1 | xargs kill
        echo "$NAME."
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop}" >&2
        exit 1
        ;;
esac

exit 0
-------------------------------------------------------------------------------------


BR,
Bandorka



Offline perryp

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Config Server 8.1 startup script for Linux?
« Reply #3 on: April 01, 2012, 02:18:23 AM »
Thanks to both of you!  Absolutely fantastic!
I will go in the lab and try these out.  I really appreciate the feedback and help.  ;D

-Perry