      REM PLIP-START
*PIC-LAN
*
*ALL
*PC
*N
*
*
*
*
******************************************************************************
******************************************************************************
***                                                                        ***
*** (C) Copyright 1990-2005 Doug Dumitru, All Rights Reserved.             ***
***                                                                        ***
*** This program is licensed under the terms of the GNU General Public     ***
*** License, version 2.0 with attached notices.                            ***
***                                                                        ***
*** The full text can be found in the LICENSE.TXT file in the              ***
*** PLIP.BP database file (the /usr/qmweb/PLIP.BP/PLIP.BP directory).      ***
***                                                                        ***
******************************************************************************
******************************************************************************
*
      INCLUDE SYS.TYPE.INCLUDE
*
      INCLUDE PL.COMMON
      INCLUDE PL.COMMON.DEFS
      INCLUDE PL.DEFS
      INCLUDE PLIP.COMMON
      INCLUDE PLW.COMMON
      INCLUDE PL.INIT.INCLUDE
*
      DUMMY = @(0,0)

      IF SYSTEM(31) <> '0' OR SYSTEM(32) = '' THEN
         display 'This version of QMWeb is licensed under the GPL and is setup'
         display 'for use with the GPL version of the OpenQM database runtime.'
         display 'Modification and distribution of this software for use in'
         display 'conjunction with a non-GPL licensed runtime is a violation'
         display 'of the GPL prohibition against linking with closed-source'
         display 'runtime libraries.'
         display
         display 'Please contact EasyCo LLC (http://easyco.com) for availability'
         display 'of commercial licenses for this software.'
         stop
      END

      E.FLG = ''
      CRLF = CR : LF
*
      MAT PLS$VARS = ''
*
      CALL PLIP.INIT.SUB
      CALL PLW.INIT.SUB('RUN')
*
      CALL PLWS.GETLOCK(PL$LOCK.FD,'WWW.CTRL,LOCK','SUPERVISOR-PROCESS',L.PORT)
      IF L.PORT <> '' THEN
         PRINT 'A supervisor is already running on port ' : L.PORT
         STOP
      END
*
      DELETE PL$CTRL.FD , 'CONFIG-EXIT'
*
      IF PLIP$SUP.PORT = '' THEN
         PRINT 'No SUPERVISOR port configured'
         STOP
      END
*
      IF PLIP$SUP.PORT = '*' THEN
         PRINT 'Starting PicLan-IP SUPERVISOR on phantom'
         PL_EXECUTE 'PHANTOM PLW-SUPERVISOR'
      END
*
      IF NOT(INDEX(SENT<2>,'M',1)) THEN
         PL_EXECUTE 'PLIP-MONITOR'
      END
   END
