11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<project default =" all" basedir =" ." name =" run-cfml" >
33 <macrodef name =" echots" >
4- <attribute name =" message" />
4+ <attribute name =" message" />
55 <sequential >
66 <local name =" timestamp" />
77 <tstamp >
1111 </sequential >
1212 </macrodef >
1313 <target name =" all" >
14- <echots message =" Lucee Starting" />
14+ <echots message =" Lucee Starting" />
1515 <script language =" CFML" >
1616 <![CDATA[
1717 systemOutput( "---------- #DateTimeFormat(now(),'yyyy-mm-dd HH:nn:ss')# - Lucee Started ----------", true);
1818 systemOutput( "#server.lucee.version#", true );
1919
20- request.adminPassword="admin";
20+ param name="adminPassword" default="admin";
21+ request.adminPassword = adminPassword;
2122 request.errorThrown = false;
2223
2324 try {
25+ param name="setAdminPassword" default="true";
26+ if ( setAdminPassword ) {
27+
28+ // set a password for the admin
29+ try {
30+ admin
31+ action="updatePassword"
32+ type="web"
33+ oldPassword=""
34+ newPassword="#request.adminPassword#";
35+ systemOutput( "Set Web admin password", true );
36+ }
37+ catch(e){
38+ systemOutput( e.message, true ); // may exist from previous execution
39+ }
2440
25- // set a password for the admin
26- try {
27- admin
28- action="updatePassword"
29- type="web"
30- oldPassword=""
31- newPassword="#request.adminPassword#";
32- systemOutput( "Set Web admin password", true );
33- }
34- catch(e){
35- systemOutput( e.message, true ); // may exist from previous execution
36- }
37-
38- try {
39- admin
40- action="updatePassword"
41- type="server"
42- oldPassword=""
43- newPassword="#request.adminPassword#";
44- systemOutput( "Set Server admin password", true );
45- }
46- catch(e){
47- systemOutput( e.message, true ); // may exist from previous execution
41+ try {
42+ admin
43+ action="updatePassword"
44+ type="server"
45+ oldPassword=""
46+ newPassword="#request.adminPassword#";
47+ systemOutput( "Set Server admin password", true );
48+ }
49+ catch(e){
50+ systemOutput( e.message, true ); // may exist from previous execution
51+ }
4852 }
4953
50-
5154 admin
5255 action="updateMapping"
5356 type="web"
5962 primary="physical"
6063 trusted="no";
6164
62- admin
63- action="getMappings"
64- type="web"
65- password="#request.adminPassword#"
66- returnVariable="mappings";
67-
6865 systemOutput( "-------------- Mappings --------------", true );
69- loop query="mappings" {
70- systemOutput("#mappings.virtual# #chr( 9 )# #mappings.strPhysical# "
71- & ( len( mappings.strArchive ) ? "[#mappings.strArchive#] " : "" )
72- & ( len( mappings.inspect ) ? "(#mappings.inspect#)" : ""), true );
66+ try {
67+ admin
68+ action="getMappings"
69+ type="web"
70+ password="#request.adminPassword#"
71+ returnVariable="mappings";
72+
73+ loop query="mappings" {
74+ systemOutput("#mappings.virtual# #chr( 9 )# #mappings.strPhysical# "
75+ & ( len( mappings.strArchive ) ? "[#mappings.strArchive#] " : "" )
76+ & ( len( mappings.inspect ) ? "(#mappings.inspect#)" : ""), true );
77+ }
78+
79+ } catch( e ){
80+ systemOutput( e.message, true );
7381 }
82+ systemOutput( "ExpandPath( '/' ) #chr(9)# #ExpandPath( '/' )#" , true );
7483
7584 param name="extensionDir" default="";
7685 if ( len( extensionDir) ){
195204 }
196205 ]]>
197206 </script >
198- <echots message =" Lucee Stopping" />
207+ <echots message =" Lucee Stopping" />
199208 </target >
200- </project >
209+ </project >
0 commit comments