pvbrowser manual
Back Content Forward

Linux

For the MULTI THREADED pvserver the "startscript" can be generated from within pvdevelop with "Linux->WriteStartscript".

#!/bin/sh
# generated by pvdevelop. Please adjust DAEMON_PATH and DAEMON to your needs.
# copy this file to /etc/init.d and link it to runlevel 5 .
DAEMON_PATH=/home/lehrig/temp/murx
DAEMON=pvs
. /etc/rc.status
rc_reset
case "$1" in
    start)
      echo -n "Starting $DAEMON"
      startproc $DAEMON_PATH/$DAEMON -sleep=100 -cd=$DAEMON_PATH > /dev/null
      rc_status -v
      ;;
    stop)
      echo -n "Shutting down $DAEMON"
      killproc -TERM $DAEMON_PATH/$DAEMON
      rc_status -v
      ;;
    try-restart)
      $0 status >/dev/null &&  $0 restart
      rc_status
      ;;
    restart)
      $0 stop
      $0 start
      rc_status
      ;;
    force-reload)
      echo -n "Reload service $DAEMON"
      killproc -HUP $DAEMON_PATH/$DAEMON
      rc_status -v
      ;;
    reload)
      echo -n "Reload service $DAEMON"
      killproc -HUP $DAEMON_PATH/$DAEMON
      rc_status -v
      ;;
    status)
      echo -n "Checking for service $DAEMON"
      checkproc $DAEMON_PATH/$DAEMON
      rc_status -v
      ;;
    *)
    echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
    exit 1
    ;;
esac
rc_exit

Now this "startscript" must be copied to "/etc/init.d", where all startscripts for servers reside.

Now you can do:


su
cd /etc/init.d
./startscript status
./startscript start
./startscript stop

In order to automatically boot YOUR_PVS in the correct runlevel you have to set a link to this file in "rc5.d". On SuSE Linux this can be done from YaST using the runlevel editor. Choose your_pvs and simply activate it.

If you want to use inetd or xinetd you have to do the following. Install and activate xinetd. In /etc/services add a line as follows.

Define a port for inetd

pvsuper         5051/tcp        # pvs super server

This defines a service pvsuper on port 5051. In /etc/xinetd.d you need the following file.

Create your start script for xinetd

nb3lehrig:/etc/xinetd.d # cat pvsuper
# default: off
# description: pvsuper ProcessViewServer daemon
service pvsuper
{
       socket_type     = stream
       protocol        = tcp
       wait            = no
       user            = root
       server          = /your/directory/pvsuper
       server_args     = -port=5051 -cd=/your/directory/
       disable         = no
}

Create your start script for inetd in /etc/inetd.conf

pvsuper stream tcp nowait root /usr/sbin/tcpd /your/directory/pvsuper -sleep=200 -cd=/your/directory

In order to activate your new server you have to restart xinetd or inetd respectively.

Restart xinetd

cd /etc/init.d
./xinetd stop
./xinetd start

Back Content Forward