      REM PLIP-RESTART
*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
*
      Q.OPT = INDEX(OCONV(SENT<2>,'MCU'),'Q',1) <> 0
      CRLF = CR : LF
*
      MAT PLS$VARS = ''
*
      CALL PLIP.INIT.SUB
      CALL PLW.INIT.SUB('RUN')
*
      RUN.FLG = NO
      CALL PLWS.GETLOCK(PL$LOCK.FD,'WWW.CTRL,LOCK','SUPERVISOR-PROCESS',L.PORT)
*
      IF L.PORT = '' THEN
         PRINT '*** Warning - no supervisor running.'
      END
*
      SELECT PL$PROC.FD
      EOF = NO
      LOOP
         READNEXT ID ELSE EOF = YES
      UNTIL EOF DO
         IF ID[1,4] = 'CFG*' AND ID[5,999] MATCHES '1N0N' THEN
            WRITEV '1' ON PL$PROC.FD , ID , 12
         END
      REPEAT
*
      WRITEV '1' ON PL$PROC.FD , 'CFG*SUP' , 12
*
      IF NOT(Q.OPT) THEN
         PRINT
         PRINT 'A restart signal has been sent to each running server'
         PRINT 'process.  It may take some time for each process to'
         PRINT 'actually restart.'
         PRINT
      END
   END
