Linux startup script

Posted by Stefan Drissen on 06-Dec-2010 04:02

Recently I installed Progress OpenEdge 10.2B02 x64 on a Centos 5.5 x64 machine.

With Google at my side I get by on Linux. Recently the machine required a reboot and I discovered that I had not yet done anything for the startup of the AdminServer.

I could find absolutely nothing in the docs on this subject. This may be considered 'basic' for a Linux person, but it was quite a search for me. My end result (which I actually find quite pleasing and the results returned by the Gnome services manager are better than Windows) is this:

Create the following script (named proadsv) in the etc/init.d directory:

#! /bin/sh

# init file for Progress OpenEdge 10.2B #

# chkconfig: 2345 99 01

# description:  Progress OpenEdge 10.2B AdminService

DLC=/opt/progress/oe10.2b

PROADSV=$DLC/bin/proadsv

# Source function library

. /etc/rc.d/init.d/functions

# [ -r /etc/sysconfig/smartmontools ] && . /etc/sysconfig/smartmontools

RETVAL=0

prog=AdminService

pidfile=/var/lock/subsys/proadsv

start()

{

  echo -n $"Starting $prog: "

  $PROADSV -start

  RETVAL=$?

  echo

  [ $RETVAL = 0 ] && touch $pidfile

  return $RETVAL

}

stop()

{

  echo -n $"Shutting down $prog: "

  $PROADSV -stop

  RETVAL=$?

  echo

  rm -f $pidfile

  return $RETVAL

}

case "$1" in

  start)

    start

    ;;

  stop)

    stop

    ;;

  restart)

    stop

    start

    ;;

  status)

    $PROADSV -query

    RETVAL=$?

    ;;

  *)

    echo $"Usage: $0 {start|stop|restart|status}"

    RETVAL=3

esac

exit $RETVAL

You can then start / stop the AdminServer and configure that it should start on reboot using the gnome gui system-config-services [ System / Administration / Services ]
From the command line you can:
sudo /sbin/service proadsv stop
sudo /sbin/service proadsv start
sudo /sbin/service proadsv restart
sudo /sbin/service proadsv status
And to enable the AdminServer at startup:
sudo /sbin/chkconfig proadsv on
I hope this helps, and any feedback on silliness is appreciated!

proadsv.zip

All Replies

Posted by Stefan Drissen on 04-Oct-2011 02:15

And now a Progress Knowledge base article has been devoted to the subject: https://progress.my.salesforce.com/articles/Article/autostartadminserviceonLinux

This thread is closed