$!----------------------------------------------------------------------------- $! STARTUP.COM $! $! Example WASD HTTPd server startup procedure. $! This does most of what is needed for the average installation. $! Using startup symbols (see below) this procedure should not need to be $! modified. The objective of course is to make future upgrades as simple $! as possible with minimum hard-wiring changes. $! $! DO NOT MODIFY THIS PROCEDURE! $! ***************************** $! $! Startup options are provided by either by supplying symbol values on the $! command-line or by explicitly assigning the symbols before calling this $! procedure. Reasonable defaults apply if these symbols do not exist. $! $! WASD_ACCOUNT ..... account server runs under (default is HTTP$SERVER) $! WASD_BATCH_LOG ... if true log the batch job (for problem resolution) $! WASD_BATCH_QUEUE ... startup batch queue (default is SYS$BATCH) $! WASD_CACHE_ROOT .. location for defining the WASD_CACHE_ROOT logical $! WASD_CONFIG ...... location of WASD config files (can be a search list) $! WASD_DECNET ...... if true DECnet scripting should be started $! WASD_ENV ......... integer sets autonomous WASD environment $! WASD_HT_ROOT ..... explicit location for the HT_ROOT logical (deprecated) $! WASD_HT_CACHE_ROOT ... location for HT_ROOT_CACHE logical (deprecated) $! WASD_HTTPD_GMT ... if not using SYS$TIMEZONE_DIFFERENTIAL (e.g. "+09:30") $! WASD_HTTPD_LOG ... if supplied defines a corresponding HTTPD$LOG logical $! WASD_NETWORK ..... run server (including detached scripts) in network mode $! WASD_NO_SERVER ... do NOT start the server image $! WASD_NON_SSL ..... if true the non-SSL image should be used $! WASD_OSSL ........ if true use the SSL image and OpenSSL (OSSL$) images $! WASD_SSL ......... if true the SSL image should be used $! WASD_SSL_CAFILE ... file location for client certificate CA verification $! WASD_SSL_CERT .... file location for the server certificate $! WASD_STARTUP ..... parameters/qualifiers applied to the server image $! WASD_TABLE ....... by default use WASD_TABLE, otherwise WASD_TABLE=0 $! WASD_VMS_SSL ..... if true use the SSL image and VMS OpenSSL libraries $! WASD_WASD_ROOT ... explicit location for defining the WASD_ROOT logical $! $! As in the following examples: $! $! $! command-line example $! $ @DKA0:[WASD_ROOT.LOCAL]STARTUP WASD_DECNET=1 WASD_SSL=1 - $! WASD_SSL_CERT="WASD_ROOT:[LOCAL]SITE.PEM" $! $! $! symbol assignment example $! $ WASD_DECNET = 1 $! $ WASD_SSL = 1 $! $ WASD_SSL_CERT = "WASD_ROOT:[LOCAL]SITE.PEM" $! $ @DKA0:[WASD_ROOT.LOCAL]STARTUP $! $! $! specifying an alternate batch queue $! $ @DKA0:[WASD_ROOT.LOCAL]STARTUP WASD_DECNET=1 WASD_BATCH_QUEUE="THISONE" $! $! If an SSL image is available that is used unless explicitly set. $! Detects VMS V7.n and uses SYS$TIMEZONE_DIFFERENTIAL for GMT unless set. $! By default WASD_ROOT logical is generated from location of this procedure. $! $! If the procedure STARTUP_LOCAL.COM exists in the same directory as this $! procedure then it is executed after all this procedure's setup and $! immediately before the server is actually started. Local setup can be $! customized in that procedure leaving this one completely untouched. $! For instance, the local startup should be used for defining local logicals, $! installing local scripts, etc. $! $! Server process startup is provided via STARTUP_SERVER.COM, $! STARTUP_SERVER_nodename.COM, STARTUP_SERVER_nodename_port.COM, $! see STARTUP_SERVER.COM and the Technical Overview for details. $! $! 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 $! --------------- $! 12-SEP-2021 MGD X86 support, VAX obsolete $! OPER required for v12.0 $! 15-AUG-2020 MGD remove default WASD_SSL_CERT as "WASD_CONFIG:HTTPD.PEM" $! 22-JUL-2019 MGD ensure VAX SYS$SHARE:CMA$RTL.EXE is INSTALLed $! 16-NOV-2017 MGD WASD_NO_SERVER=[0|1] do not execute the server image $! define WASD_ROOT_ logical name as required $! 21-JUN-2017 MGD use /INSTANCE=CONFIG to ensure startup use config values $! 07-AUG-2016 MGD allow use of OpenSSL v1.1.0 (OSSL$..) shareable libraries $! with WASD_OSSL startup option symbol $! 15-SEP-2013 MGD privilege set and check $! 31-AUG-2013 MGD ensure GNV$LIBZSHR32 is INSTALLed $! 10-JUN-2011 MGD proc_dir = f$edit(,"upcase") for extended parsing (per EW) $! 15-DEC-2009 MGD bugfix; f$search("WASD_CONFIG:HTTPD$SERVICE.CONF") $! 10-OCT-2009 MGD SECURITY privilege required for v10 VMS/SYSUAF ACME $! 11-JUL-2009 MGD v10 and pre-v10 logical names $! WASD autonomous environments $! 06-JUN-2007 MGD bugfix; CREATE /DIR /OWN='WASD_ACCOUNT' (mg eds.com) $! 05-JUL-2006 MGD bugfix; 'if WASD_STARTUP' to 'if WASD_STARTUP .nes. ""' $! 05-FEB-2006 MGD change procedure message to "%WASD-.." $! 22-DEC-2004 MGD modify handling of WASD_VMS_VERSION (system logical name) $! 27-NOV-2004 MGD install LIBZ sharable image if necessary, $! check for the sharable image and define WASD_CGILIBSHR32 $! WASD_STARTUP symbol for defining HTTPD$STARTUP_SERVER $! 22-DEC-2003 MGD support for IA64, $! CMKRNL required for v8.4, $! WASD_NETWORK to run server (and scripts) in network mode $! 30-DEC-2002 MGD bugfix; batch startup endless loop $! 15-OCT-2002 MGD WASD 8.1 and later detects it's own startup procedure, $! new logicals and revised locations for post-8.1 $! 10-AUG-2002 MGD allow for using VMS OpenSSL v1.0-A $! 03-NOV-2001 MGD PERSONA_MACRO for pre-VMS 6.2 VAX $! 13-JUL-2001 MGD define SSL_CAFILE only if it exists $! 12-MAY-2001 MGD install PRMGBL,SYSGBL,SHMEM for monitor global section, $! add wildcards to F$SEARCH to prevent "run-aways" $! 26-JAN-2001 MGD v7.2, add WASD_SSL_CAFILE and HTTPD$SSL_CAFILE $! 07-DEC-2000 MGD add HT_SCRATCH $! 01-JUL-2000 MGD v7.1, add WORLD,SYSLCK privileges, $! CGI-BIN changed to "CGI-BIN" for VMS V5.5-2, $! conditional definition of HTTP$SERVICE logical, $! WASD_BATCH_QUEUE allows non-default SYS$BATCH, $! allow for a STARTUP_SERVER_LOCAL.COM $! 31-OCT-1999 MGD v6.1, remove NETLIB support $! 15-JAN-1999 MGD v6.0, proxy cache directory $! 04-DEC-1998 MGD bugfix; to above commentary, provide WASD_HTTPD_LOG $! 01-NOV-1998 MGD v5.3, (better support for virtual services) $! 27-JUN-1998 MGD v5.1 $! 07-FEB-1998 MGD v5.0 $! ??-???-???? MGD long unrecorded pre-history :^) $!----------------------------------------------------------------------------- $! $ set on $ say = "write sys$output" $ procedure = f$environment("procedure") $ proc_device = f$parse(procedure,,,"device","no_conceal") $ proc_dir = f$edit(f$parse(procedure,,,"directory","no_conceal"),"upcase") $ arch_name = f$getsyi("arch_name") $ if f$edit(arch_name,"upcase") .eqs. "ALPHA" then arch_name = "AXP" $ vms_version = f$integer(f$extract(1,1,f$getsyi("version"))) * 10 +- f$integer(f$extract(3,1,f$getsyi("version"))) $! $ required_privs = "CMKRNL,DETACH,SYSNAM,SYSPRV" $ orig_privs = f$setprv(required_privs) $ if .not. f$privilege(required_privs) $ then $ discard = f$setprv(orig_privs) $ write sys$output "%WASD-E-STARTUP, requires ''required_privs' privileges" $ exit %X00000024 $ endif $! $! $ say "%WASD-I-STARTUP, begin" $! $! --------------- $! STARTUP SYMBOLS $! --------------- $! $ on warning then exit $ if P1 .nes. "" then 'P1' $ if P2 .nes. "" then 'P2' $ if P3 .nes. "" then 'P3' $ if P4 .nes. "" then 'P4' $ if P5 .nes. "" then 'P5' $ if P6 .nes. "" then 'P6' $ if P7 .nes. "" then 'P7' $ if P8 .nes. "" then 'P8' $ on warning then continue $! $!(careful to evaluate these in the specific order) $ if f$type(wasd_wasd_root) .eqs. "" then wasd_wasd_root = "" $ if wasd_wasd_root .eqs. "" then - if f$type(wasd_ht_root) .eqs. "" then - wasd_wasd_root = "" $! $!(careful to evaluate these in the specific order) $ if f$type(wasd_cache_root) .eqs. "" then wasd_cache_root = "" $ if wasd_cache_root .eqs. "" then - if f$type(wasd_ht_cache_root) .eqs. "" then - wasd_cache_root = "" $! $ if f$type(wasd_account) .eqs. "" then wasd_account = "HTTP$SERVER" $ if f$type(wasd_batch_queue) .eqs. "" then wasd_batch_queue = "SYS$BATCH" $ if f$type(wasd_batch_log) .eqs. "" then wasd_batch_log = 0 $ if f$type(wasd_config) .eqs. "" then wasd_config = "WASD_ROOT:[LOCAL]" $ if f$type(wasd_decnet) .eqs. "" then wasd_decnet = 0 $ if f$type(wasd_env) .eqs. "" then wasd_env = 1 $ if f$type(wasd_env) .eqs. "STRING" then wasd_env = 1 $ if f$type(wasd_httpd_gmt) .eqs. "" then wasd_httpd_gmt = "" $ if f$type(wasd_table) .eqs. "" then wasd_table = 1 $ if f$type(wasd_table) .eqs. "STRING" then wasd_table = 1 $ if f$type(wasd_network) .eqs. "" then wasd_network = 0 $ if f$type(wasd_non_ssl) .eqs. "" then wasd_non_ssl = 0 $ if f$type(wasd_no_server) .eqs. "" then wasd_no_server = 0 $ if f$type(wasd_ssl) .eqs. "" then wasd_ssl = 0 $ if f$type(wasd_ssl_cafile) .eqs. "" then - wasd_ssl_cafile = "WASD_CONFIG:CA-BUNDLE_CRT.TXT" $ if f$type(wasd_startup) .eqs. "" then wasd_startup = "" $ if f$type(wasd_ossl) .eqs. "" then wasd_ossl = 0 $ if f$type(wasd_vms_ssl) .eqs. "" then wasd_vms_ssl = 0 $! $!(specify this using a $ DEFINE /SYSTEM WASD_VMS_VERSION "Vn.n") $ wasd_vms_version = f$trnlnm("wasd_vms_version") $ if wasd_vms_version .nes. "" - then vms_version = f$integer(f$extract(1,1,wasd_vms_version)) * 10 +- f$integer(f$extract(3,1,wasd_vms_version)) $ delete /symbol wasd_vms_version $! $! --------- $! WASD ENV? $! --------- $! $ if wasd_env .gt. 15 $ then $ write sys$output "%WASD-E-STARTUP, environment out-of-range" $ discard = f$setprv(orig_privs) $ exit %X10000014 $ endif $! $! --------- $! WASD ROOT $! --------- $! $ if wasd_wasd_root .eqs. "" $ then $! (derive from location of procedure) $ root_dir = f$extract(f$locate("HT_ROOT",proc_dir),999,proc_dir) $ if root_dir .eqs. "" then - root_dir = f$extract(f$locate("WASD_ROOT",proc_dir),999,proc_dir) $ if root_dir .eqs. "" $ then $ write sys$output "%WASD-E-STARTUP, must be WASD_ROOT.DIR or HT_ROOT.DIR" $ discard = f$setprv(orig_privs) $ exit %X10000014 $ endif $ root_dir = f$extract(f$locate(".",root_dir),999,root_dir) $ root_dir = proc_dir - root_dir $ wasd_root = proc_device + root_dir + ".]" $ else $ wasd_root = wasd_wasd_root $ endif $! $! ---------------- $! WASD NAME TABLE? $! ---------------- $! $ if wasd_table .ge. 1 .or. wasd_env .ge. 2 $ then $ if wasd_env .ge. 2 $ then $ wasd_table = "WASD_TABLE_" + f$string(wasd_env) $ wasd_file_dev = "WASD_FILE_DEV_" + f$string(wasd_env) $ else $ wasd_table = "WASD_TABLE" $ wasd_file_dev = "WASD_FILE_DEV" $ endif $ create /name_table /executive /log - /protection=(S:RWCD,O:RWCD,G:R,W:R) - /parent=LNM$SYSTEM_DIRECTORY 'wasd_table' $! (root directory is the only location with universal read access!) $ env_root = wasd_root - ".]" + "]" $ define /system /executive 'wasd_file_dev' 'env_root'WASD_FILE_DEV.COM $! (insert the new table into the default process table) $ if wasd_env .ge. 2 $ then @'wasd_file_dev' 'wasd_env' $ else @'wasd_file_dev' $ endif $ else $ wasd_table = "LNM$SYSTEM" $ endif $ deflognam = "define /nolog /executive /table=" + wasd_table $! $! --------------------- $! DEFINE HTTPd LOGICALS $! --------------------- $! $ if wasd_env .ge. 2 $ then $ deflognam /trans=concealed wasd_root 'wasd_root' $ define /system /executive /trans=concealed wasd_root_'wasd_env' 'wasd_root' $ else define /system /executive /trans=concealed wasd_root 'wasd_root' $ endif $ if f$search("WASD_ROOT:[STARTUP]STARTUP.COM") .eqs. "" $ then $ say "%WASD-E-STARTUP, problem with WASD_ROOT logical" $ show logical /full wasd_root $ discard = f$setprv(orig_privs) $ exit %X10000014 $ endif $!(though deprecated, provide HT_ROOT for backward-compability) $ if wasd_env .ge. 2 $ then deflognam /trans=concealed ht_root 'wasd_root' $ else define /system /executive /trans=concealed ht_root 'wasd_root' $ endif $! $ if wasd_cache_root .nes. "" $ then $ deflognam /translation=concealed wasd_cache_root 'wasd_cache_root' $! (though deprecated, provide HT_CACHE_ROOT for backward-compability) $ deflognam /translation=concealed ht_cache_root 'wasd_cache_root' $ dir /nooutput WASD_CACHE_ROOT:[000000] $ if .not. $status .and. $status .ne. %x10018290 $ then $ create_wasd_cache_root = wasd_cache_root - ".]" + "]" $ say "%WASD-I-STARTUP, creating proxy cache directory " +- create_wasd_cache_root $ create /dir /own='wasd_account' /prot=(s:rwed,o:rwed,g:rwed,w) - 'create_wasd_cache_root' $ dir /nooutput WASD_CACHE_ROOT:[000000] $ if .not. $status .and. $status .ne. %x10018290 $ then $ say "%WASD-E-STARTUP, problem with WASD_CACHE_ROOT logical" $ show logical /full wasd_cache_root $ discard = f$setprv(orig_privs) $ exit %X10000014 $ endif $ endif $ set on $ endif $! $ if wasd_env .ge. 2 then deflognam WASD_ENV 'wasd_env' $! $ deflognam WASD_CONFIG 'wasd_config' $ if f$search("WASD_CONFIG:WASD_CONFIG_AUTH.CONF") .nes. "" $ then deflognam WASD_CONFIG_AUTH WASD_CONFIG:WASD_CONFIG_AUTH.CONF $ else deflognam WASD_CONFIG_AUTH WASD_CONFIG:HTTPD$AUTH.CONF $ endif $ if f$search("WASD_CONFIG:WASD_CONFIG_GLOBAL.CONF") .nes. "" $ then deflognam WASD_CONFIG_GLOBAL WASD_CONFIG:WASD_CONFIG_GLOBAL.CONF $ else deflognam WASD_CONFIG_GLOBAL WASD_CONFIG:HTTPD$CONFIG.CONF $ endif $ if f$search("WASD_CONFIG:WASD_CONFIG_MAP.CONF") .nes. "" $ then deflognam WASD_CONFIG_MAP WASD_CONFIG:WASD_CONFIG_MAP.CONF $ else deflognam WASD_CONFIG_MAP WASD_CONFIG:HTTPD$MAP.CONF $ endif $ if f$search("WASD_CONFIG:WASD_CONFIG_MSG.CONF") .nes. "" $ then deflognam WASD_CONFIG_MSG WASD_CONFIG:WASD_CONFIG_MSG.CONF $ else deflognam WASD_CONFIG_MSG WASD_CONFIG:HTTPD$MSG.CONF $ endif $!(service is slightly different in that traditionally its been optional) $ if f$search("WASD_CONFIG:WASD_CONFIG_SERVICE.CONF") .nes. "" $ then $ deflognam WASD_CONFIG_SERVICE WASD_CONFIG:WASD_CONFIG_SERVICE.CONF $ else $ if f$search("WASD_CONFIG:HTTPD$SERVICE.CONF") .nes. "" - then deflognam WASD_CONFIG_SERVICE WASD_CONFIG:HTTPD$SERVICE.CONF $ endif $ if f$type(wasd_httpd_log) .nes. "" then - deflognam WASD_CONFIG_LOG 'wasd_httpd_log' $! $ deflognam WASD_AUTH WASD_ROOT:[LOCAL] $ deflognam WASD_LOCAL WASD_ROOT:[LOCAL] $ deflognam WASD_LOGS WASD_ROOT:[LOG] $!(though deprecated, provide HT_LOGS for backward-compability) $ deflognam HT_LOGS WASD_ROOT:[LOG] $ deflognam WASD_SCRATCH WASD_ROOT:[SCRATCH] $!(though deprecated, provide HT_SCRATCH for backward-compability) $ deflognam HT_SCRATCH WASD_ROOT:[SCRATCH] $ deflognam WASD_SERVER_LOGS WASD_ROOT:[LOG_SERVER] $ deflognam WASD_STARTUP WASD_ROOT:[STARTUP] $! $ deflognam WASD_AXP WASD_ROOT:[AXP] $ deflognam WASD_IA64 WASD_ROOT:[IA64] $ deflognam WASD_X86 WASD_ROOT:[X86_64] $ deflognam WASD_EXE WASD_ROOT:['arch_name'] $!(for local startup use) $ define/process WASD_EXE WASD_ROOT:['arch_name'] $!(though deprecated, provide HT_EXE for backward-compability) $ deflognam HT_EXE WASD_ROOT:['arch_name'] $! $ deflognam CGI_BIN WASD_ROOT:[CGI-BIN] $ deflognam CGI_EXE WASD_ROOT:['ARCH_NAME'-BIN] $ deflognam WASD_CGI_BIN WASD_ROOT:[CGI-BIN] $ deflognam WASD_CGI_AXP WASD_ROOT:[AXP-BIN] $ deflognam WASD_CGI_IA64 WASD_ROOT:[IA64-BIN] $ deflognam WASD_CGI_X86 WASD_ROOT:[X86_64-BIN] $ deflognam WASD_CGI_EXE WASD_ROOT:['arch_name'-BIN] $ cgi_bin = wasd_root - ".]" + ".CGI-BIN.]" $ cgi_exe = wasd_root - ".]" + ".''arch_name'-BIN.]" $ deflognam /translation=concealed "CGI-BIN" 'cgi_bin','cgi_exe' $! $ deflognam wasd_script WASD_ROOT:[SCRIPT] $ script_local_root = wasd_root - ".]" + ".SCRIPT_LOCAL.]" $ deflognam WASD_SCRIPT_LOCAL WASD_ROOT:[SCRIPT_LOCAL] $ java_root = wasd_root - ".]" + ".JAVA.]" $ deflognam WASD_JAVA WASD_ROOT:[JAVA] $! $ if wasd_httpd_gmt .eqs. "" $ then $ if vms_version .lt. 70 $ then $ say "%WASD-E-STARTUP, unreliable UTC time (set WASD_HTTPD_GMT symbol)" $ discard = f$setprv(orig_privs) $ exit %X10000014 $ endif $ else $ deflognam WASD_CONFIG_GMT "''wasd_httpd_gmt'" $ endif $! $ if wasd_network $ then slash_network = "/network" $ else slash_network = "" $ endif $! $! -------------------- $! DECNET/OSU SCRIPTING $! -------------------- $! $ if wasd_decnet $ then $! $ say "%WASD-I-STARTUP, providing DECnet/OSU scripting" $! $! (derive from the location of this procedure) $ startup_decnet = proc_device + proc_dir + "STARTUP_DECNET.COM" $ @'startup_decnet' 'wasd_env' $! $ endif $! $! ------------------------ $! INSTALL PRIVILEGED IMAGE $! ------------------------ $! $ if wasd_vms_ssl then wasd_ssl = 1 $ if wasd_non_ssl then wasd_ssl = 0 $ if .not. wasd_ssl .and. .not. wasd_non_ssl $ then $ if f$search("WASD_EXE:HTTPD_SSL.EXE") .eqs. "" $ then wasd_ssl = 0 $ else wasd_ssl = 1 $ endif $ endif $ if wasd_ssl $ then say "%WASD-I-STARTUP, using SSL image" $ else say "%WASD-I-STARTUP, using non-SSL image" $ endif $ if wasd_vms_ssl then - say "%WASD-I-VMSOPENSSL, using VMS OpenSSL shareable images" $! $ httpd_exe = "WASD_EXE:HTTPD" $ if wasd_ssl then httpd_exe = httpd_exe + "_SSL" $ httpd_exe = httpd_exe + ".EXE" $ httpd = "$''httpd_exe'" $! $ sechan = "$WASD_EXE:SECHAN" $ sechan /asif=startup 'httpd_exe' $! $ install = "$SYS$SYSTEM:INSTALL/COMMAND_MODE" $ instprv = "ALTPRI,CMKRNL,DETACH,OPER,PRMGBL,PRMMBX,PSWAPM," +- "SECURITY,SYSGBL,SYSLCK,SYSPRV,SYSNAM,WORLD" $ define /user sys$output nl: $ define /user sys$error nl: $ install remove 'httpd_exe' $ install add 'httpd_exe' /privilege=('instprv') $! $ deflognam WASD_HTTPD_EXE 'httpd_exe' $! $! ----------- $! CGILIBSHR32 $! ----------- $! $ if f$search("CGI_EXE:CGILIBSHR32.EXE") .nes. "" then - deflognam WASD_CGILIBSHR32 CGI_EXE:CGILIBSHR32.EXE $! $! ------------ $! INSTALL LIBZ $! ------------ $! $ if f$trnlnm("LIBZ_SHR32") .nes. "" then - if .not. f$file("LIBZ_SHR32","known") then - install add /open /header /share LIBZ_SHR32 $! $ if f$trnlnm("GNV$LIBZSHR32") .nes. "" then - if .not. f$file("GNV$LIBZSHR32","known") then - install add /open /header /share GNV$LIBZSHR32 $! $! ---------------- $! SSL REQUIREMENTS $! ---------------- $! $ if wasd_ssl $ then $ if f$search("''wasd_ssl_cert'") .nes. "" then - deflognam WASD_SSL_CERT 'wasd_ssl_cert' $ if f$search("''wasd_ssl_cafile'") .nes. "" then - deflognam WASD_SSL_CAFILE 'wasd_ssl_cafile' $ if wasd_ossl $ then $! (ensure OpenSSL v1.1.0 or later shareable images are INSTALLed) $ if .not. f$file("OSSL$LIBCRYPTO_SHR32","known") - then install add /open /header /share OSSL$LIBCRYPTO_SHR32 $ if .not. f$file("OSSL$LIBSSL_SHR32","known") - then install add /open /header /share OSSL$LIBSSL_SHR32 $ endif $ if wasd_vms_ssl $ then $! (ensure VMS OpenSSL shareable images are INSTALLed) $ if .not. f$file("SYS$LIBRARY:SSL$LIBCRYPTO_SHR32.EXE","known") - then install add /open /header /share SYS$LIBRARY:SSL$LIBCRYPTO_SHR32.EXE $ if .not. f$file("SYS$LIBRARY:SSL$LIBSSL_SHR32.EXE","known") - then install add /open /header /share SYS$LIBRARY:SSL$LIBSSL_SHR32.EXE $ endif $ endif $! $ if wasd_no_server $ then $ say "%WASD-I-STARTUP, end (server not started)" $ exit $ endif $! $! $! ------------- $! LOCAL STARTUP $! ------------- $! $!(note that this value must have any quotes escaped) $ if wasd_startup .nes. "" then deflognam WASD_STARTUP_SERVER "''wasd_startup'" $! $!(derive from the location of this procedure) $ startup_local = proc_device + proc_dir + "STARTUP_LOCAL.COM" $ if f$search(startup_local) .nes. "" then @'startup_local' $! $! ------------------ $! START HTTPd SERVER $! ------------------ $! $ startup_procedure = "" $ if vms_version .ge. 62 $ then $! (look for version 8.n or later of the server) $ define /user sys$output nl: $ define /user sys$error nl: $ search 'httpd_exe' "[STARTUP]" $ if $severity .eqs. "1" then startup_procedure = "[STARTUP]" $ startup_server = "" $ endif $ if startup_procedure .eqs. "" $ then $! (look for STARTUP_SERVER_nodename_port.COM) $ startup_server = proc_device + proc_dir + "startup_server_" + - f$edit(f$getsyi("scsnode"),"collapse") + "_*.COM;0" $ startup_procedure = f$search(startup_server) $ startup_server = "" $ endif $ if startup_procedure .eqs. "" $ then $! (look for STARTUP_SERVER_nodename.COM) $ startup_server = proc_device + proc_dir + "startup_server_" + - f$edit(f$getsyi("scsnode"),"collapse") + ".C%M;0" $ startup_procedure = f$search(startup_server) $ startup_server = "" $ endif $ if startup_procedure .eqs. "" $ then $! (nothing node/port specific look for a local, site-specific startup file) $ startup_server = proc_device + proc_dir +- "STARTUP_SERVER_LOCAL.C%M;0" $ startup_procedure = f$search(startup_server) $ startup_server = "" $ endif $ if startup_procedure .eqs. "" $ then $! (nothing node/port/local specific, look for post-v5.3 startup) $ startup_server = proc_device + proc_dir + "STARTUP_SERVER.C%M;0" $ startup_procedure = f$search(startup_server) $ startup_server = "" $ endif $ if startup_procedure .eqs. "" $ then $! (none was found, pre-v5.3 startup) $ startup_procedure = "WASD_ROOT:[HTTP$SERVER]HTTPD_BATCH.C%M" $ endif $! (ensure configuration file values are used by reseting global section values) $ httpd /instance=config $ startup_server_loop: $ if startup_procedure .eqs. "" then goto end_startup_server_loop $ startup_name = f$parse(startup_procedure,,,"name") $ show symbol startup_procedure $ if vms_version .ge. 62 $ then $ if startup_procedure .eqs. "[STARTUP]" then startup_procedure = "" $ if wasd_env .ge. 2 $ then httpd /detach /env='wasd_env' /user='wasd_account' - 'startup_procedure' 'slash_network' $ else httpd /detach /user='wasd_account' - 'startup_procedure' 'slash_network' $ endif $ else $ if wasd_batch_log $ then batchlog = "/log=WASD_SERVER_LOGS:" + startup_name + ".LOG" $ else batchlog = "/nolog" $ endif $ submit 'startup_procedure' /queue='wasd_batch_queue' - /param=("''slash_network'") /user='wasd_account' - 'batchlog' /noprint $ endif $ if startup_procedure .eqs. "" then goto end_startup_server_loop $ startup_procedure = f$search(startup_server) $ goto startup_server_loop $ end_startup_server_loop: $! $ deassign/process WASD_EXE $ discard = f$setprv(orig_privs) $! $ say "%WASD-I-STARTUP, end" $! $!-----------------------------------------------------------------------------