[0001]
[0002]
[0003]
[0004]
[0005]
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071]
[0072]
[0073]
[0074]
[0075]
[0076]
[0077]
[0078]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103]
[0104]
[0105]
[0106]
$!-----------------------------------------------------------------------------
$! SHUTDOWN.COM
$!
$! Example WASD HTTPd server shutdown procedure.
$!
$! Causes the WASD server to exit immediately.
$! Removes known WASD utilities and applications INSTALLed as known images.
$! If P1 is an integer between 2 and 15 will shtudown that WASD environment.
$! If multiple WASD environments share the WASD_ROOT tree then this procedure
$! may unINSTALL images for ALL of those environments!
$!
$! DO NOT MODIFY THIS PROCEDURE!
$! *****************************
$!
$! Copyright (C) 1996-2021 Mark G.Daniel.
$!
$! Licensed under the Apache License, Version 2.0 (the "License");
$! you may not use this file except in compliance with the License.
$! You may obtain a copy of the License at
$!
$!    http://www.apache.org/licenses/LICENSE-2.0
$!
$! Unless required by applicable law or agreed to in writing, software
$! distributed under the License is distributed on an "AS IS" BASIS,
$! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
$! See the License for the specific language governing permissions and
$! limitations under the License.
$!
$! VERSION HISTORY
$! ---------------
$! 11-JUL-2009  MGD  v10 and pre-v10 logical names
$!                   WASD autonomous environments
$! 05-FEB-2006  MGD  initial
$!-----------------------------------------------------------------------------
$!
$ set noon
$ say = "write sys$output"
$!
$ say "%WASD-I-SHUTDOWN, begin"
$!
$!(set up process' LNM$_FILE_DEV for v10.0 and later)
$ if f$type(P1) .eqs. "INTEGER" .and. P1 .ge. 2
$ then
$    if P1 .gt. 15 
$    then
$       write sys$output "%SHUTDOWN-E-ENV, out-of-range"
$       exit %X10000014
$    endif
$    wasd_file_dev = "WASD_FILE_DEV_" + f$string(P1)
$    envis = "/ENV=" + f$string(P1)
$ else
$    wasd_file_dev = "WASD_FILE_DEV"
$    envis = ""
$ endif
$ if f$trnlnm(wasd_file_dev) .nes. "" then @'wasd_file_dev' 'P1'
$!
$ if f$trnlnm("WASD_EXE") .nes. ""
$ then
$!   (all possibilities)
$    call shutdown wasd_exe:httpd.exe
$    call shutdown wasd_exe:httpd_ssl.exe
$    call remove wasd_exe:httpd.exe
$    call remove wasd_exe:httpd_ssl.exe
$ else
$!   (ditto)
$    call shutdown ht_exe:httpd.exe
$    call shutdown ht_exe:httpd_ssl.exe
$    call remove ht_exe:httpd.exe
$    call remove ht_exe:httpd_ssl.exe
$ endif
$!
$!(commonly INSTALLed WASD utilities/applications)
$ call remove cgi_exe:pcache.exe
$ call remove cgi-bin:[000000]pcache.exe
$ call remove cgi_exe:qdlogstats.exe
$ call remove cgi-bin:[000000]qdlogstats.exe
$ call remove cgi_exe:soymail.exe
$ call remove cgi-bin:[000000]soymail.exe
$ call remove cgi_exe:yahmail.exe
$ call remove cgi-bin:[000000]yahmail.exe
$!
$ say "%WASD-I-SHUTDOWN, end"
$ exit
$!
$ shutdown : subroutine
$    if f$search(p1) .eqs. "" then exit 
$    if .not. f$file(p1,"known") then exit
$    httpd = "$" + P1
$    set verify
$ httpd /do=exit=now 'envis'
$!   'f$verify(0)
$    wait 00:00:02
$    exit
$ endsubroutine
$!
$ remove : subroutine
$    if f$search(p1) .eqs. "" then exit 
$    if .not. f$file(p1,"known") then exit
$    install = "$sys$system:install/command_mode"
$    set verify
$ install remove 'p1'
$!   'f$verify(0)
$    exit
$ endsubroutine
$!
$!-----------------------------------------------------------------------------