| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
|
|---|
| 3 |
<!-- Install the bedework Calendar quickstart. |
|---|
| 4 |
|
|---|
| 5 |
This is imported by the quickstart build.xml ensuring all changes to this file |
|---|
| 6 |
appear in the repository. |
|---|
| 7 |
|
|---|
| 8 |
Authors: Mike Douglass douglm - rpi.edu |
|---|
| 9 |
--> |
|---|
| 10 |
|
|---|
| 11 |
<project name="quickstart-install" default="install" basedir="."> |
|---|
| 12 |
<target name="run.init"> |
|---|
| 13 |
<property name="org.bedework.project.bedework" |
|---|
| 14 |
location="${basedir}/bedework" /> |
|---|
| 15 |
|
|---|
| 16 |
<property name="org.bedework.directory.dir" |
|---|
| 17 |
location="${org.bedework.project.bedework}/../apacheds-1.5.3.fixed" /> |
|---|
| 18 |
</target> |
|---|
| 19 |
|
|---|
| 20 |
<!-- ================================================================= |
|---|
| 21 |
The "install" target does the install |
|---|
| 22 |
|
|---|
| 23 |
1. Copy bwbuild into the users home directory |
|---|
| 24 |
2. If a new directory is needed |
|---|
| 25 |
a. init the directory |
|---|
| 26 |
b. Create a caladmin user with supplied password |
|---|
| 27 |
c. Create a test user |
|---|
| 28 |
If a directory is to be copied from a previous quickstart, copy the |
|---|
| 29 |
directory server files. |
|---|
| 30 |
================================================================= --> |
|---|
| 31 |
|
|---|
| 32 |
<target name="install" depends="run.init" |
|---|
| 33 |
description="Install the quickstart"> |
|---|
| 34 |
<echo message="Create bwbuild in user home"/> |
|---|
| 35 |
|
|---|
| 36 |
<if> |
|---|
| 37 |
<available file="${user.home}/bwbuild" type="dir" /> |
|---|
| 38 |
<then> |
|---|
| 39 |
<echo message="========================================================" /> |
|---|
| 40 |
<echo message="You already have a bwbuild in user home ${user.home}" /> |
|---|
| 41 |
<echo message="Enter 'yes' to continue with the directory unchanged" /> |
|---|
| 42 |
<echo message="(you may need to update it afterwards)" /> |
|---|
| 43 |
<echo message="Enter anything else to terminate the install allowing " /> |
|---|
| 44 |
<echo message="you to rename or destroy it." /> |
|---|
| 45 |
<echo message="========================================================" /> |
|---|
| 46 |
|
|---|
| 47 |
<input message="Continue? yes/no" |
|---|
| 48 |
addproperty="org.bedework.install.bwbuild.reply" /> |
|---|
| 49 |
|
|---|
| 50 |
<if> |
|---|
| 51 |
<not> |
|---|
| 52 |
<equals arg1="${org.bedework.install.bwbuild.reply}" arg2="yes" /> |
|---|
| 53 |
</not> |
|---|
| 54 |
<then> |
|---|
| 55 |
<fail /> |
|---|
| 56 |
</then> |
|---|
| 57 |
</if> |
|---|
| 58 |
</then> |
|---|
| 59 |
<else> |
|---|
| 60 |
<copy toDir="${user.home}/bwbuild" > |
|---|
| 61 |
<fileset dir="${org.bedework.project.bedework}/config/bwbuild" /> |
|---|
| 62 |
</copy> |
|---|
| 63 |
</else> |
|---|
| 64 |
</if> |
|---|
| 65 |
|
|---|
| 66 |
<echo message="========================================================" /> |
|---|
| 67 |
<echo message="We need to create a new directory for the quickstart" /> |
|---|
| 68 |
<!-- This after 3.5 |
|---|
| 69 |
<echo message="or copy a previous quickstart directory into the new quickstart" /> |
|---|
| 70 |
--> |
|---|
| 71 |
<echo message="========================================================" /> |
|---|
| 72 |
|
|---|
| 73 |
<echo message="Creating a new directory for the quickstart" /> |
|---|
| 74 |
<parallel> |
|---|
| 75 |
<antcall target="dirstart" inheritrefs="true" /> |
|---|
| 76 |
<sequential> |
|---|
| 77 |
<sleep seconds="10" /> |
|---|
| 78 |
<antcallback target="initDir" inheritrefs="true" |
|---|
| 79 |
return="org.bedework.directory.init.status" /> |
|---|
| 80 |
<if> |
|---|
| 81 |
<equals arg1="${org.bedework.directory.init.status}" arg2="0" /> |
|---|
| 82 |
<then> |
|---|
| 83 |
<echo message="Initialisation went OK" /> |
|---|
| 84 |
<property name="org.bedework.install.dirinit.reply" value="yes" /> |
|---|
| 85 |
</then> |
|---|
| 86 |
<elseif> |
|---|
| 87 |
<equals arg1="${org.bedework.directory.init.status}" arg2="1" /> |
|---|
| 88 |
<then> |
|---|
| 89 |
<echo message="========================================================" /> |
|---|
| 90 |
<echo message="The directory appears to be initialised already" /> |
|---|
| 91 |
<echo message="========================================================" /> |
|---|
| 92 |
|
|---|
| 93 |
<input message="Continue with adding users/groups? yes/no" |
|---|
| 94 |
addproperty="org.bedework.install.dirinit.reply" /> |
|---|
| 95 |
|
|---|
| 96 |
<if> |
|---|
| 97 |
<not> |
|---|
| 98 |
<equals arg1="${org.bedework.install.dirinit.reply}" arg2="yes" /> |
|---|
| 99 |
</not> |
|---|
| 100 |
<then> |
|---|
| 101 |
<fail /> |
|---|
| 102 |
</then> |
|---|
| 103 |
</if> |
|---|
| 104 |
</then> |
|---|
| 105 |
</elseif> |
|---|
| 106 |
<else> |
|---|
| 107 |
<echo message="Initialisation failed" /> |
|---|
| 108 |
|
|---|
| 109 |
</else> |
|---|
| 110 |
</if> |
|---|
| 111 |
|
|---|
| 112 |
<if> |
|---|
| 113 |
<equals arg1="${org.bedework.install.dirinit.reply}" arg2="yes" /> |
|---|
| 114 |
<then> |
|---|
| 115 |
<echo message="======== super user info =======" /> |
|---|
| 116 |
|
|---|
| 117 |
<input message="Account name for superuser" |
|---|
| 118 |
defaultvalue="caladmin" |
|---|
| 119 |
addproperty="org.bedework.install.superuser.account" /> |
|---|
| 120 |
|
|---|
| 121 |
<input message="Account password for superuser" |
|---|
| 122 |
addproperty="org.bedework.install.superuser.password" /> |
|---|
| 123 |
|
|---|
| 124 |
<echo message="======== Administrative user info =======" /> |
|---|
| 125 |
|
|---|
| 126 |
<input message="Account name for an administrative user" |
|---|
| 127 |
defaultvalue="calowner01" |
|---|
| 128 |
addproperty="org.bedework.install.admin.account" /> |
|---|
| 129 |
|
|---|
| 130 |
<input message="Account password for an administrative user" |
|---|
| 131 |
addproperty="org.bedework.install.admin.password" /> |
|---|
| 132 |
|
|---|
| 133 |
<echo message="======== personal calendar user info =======" /> |
|---|
| 134 |
|
|---|
| 135 |
<input message="Account name for a test user" |
|---|
| 136 |
defaultvalue="testuser01" |
|---|
| 137 |
addproperty="org.bedework.install.testuser.account" /> |
|---|
| 138 |
|
|---|
| 139 |
<input message="Account password for test user" |
|---|
| 140 |
addproperty="org.bedework.install.testuser.password" /> |
|---|
| 141 |
|
|---|
| 142 |
<echo message="======== Create superuser =======" /> |
|---|
| 143 |
|
|---|
| 144 |
<addBedeworkUser account="${org.bedework.install.superuser.account}" |
|---|
| 145 |
firstName="first" |
|---|
| 146 |
lastName="last" |
|---|
| 147 |
password="${org.bedework.install.superuser.account}" /> |
|---|
| 148 |
|
|---|
| 149 |
<echo message="======== Create administrative user =======" /> |
|---|
| 150 |
|
|---|
| 151 |
<addBedeworkUser account="${org.bedework.install.admin.account}" |
|---|
| 152 |
firstName="first" |
|---|
| 153 |
lastName="last" |
|---|
| 154 |
password="${org.bedework.install.admin.account}" /> |
|---|
| 155 |
|
|---|
| 156 |
<echo message="======== Create personal calendar user =======" /> |
|---|
| 157 |
|
|---|
| 158 |
<addBedeworkUser account="${org.bedework.install.testuser.account}" |
|---|
| 159 |
firstName="first" |
|---|
| 160 |
lastName="last" |
|---|
| 161 |
password="${org.bedework.install.testuser.account}" /> |
|---|
| 162 |
</then> |
|---|
| 163 |
</if> |
|---|
| 164 |
|
|---|
| 165 |
<antcall target="dirstop" inheritrefs="true" /> |
|---|
| 166 |
</sequential> |
|---|
| 167 |
</parallel> |
|---|
| 168 |
|
|---|
| 169 |
<!-- ================================================================= |
|---|
| 170 |
Some final reminders |
|---|
| 171 |
================================================================= --> |
|---|
| 172 |
|
|---|
| 173 |
<if> |
|---|
| 174 |
<isset property="org.bedework.install.bwbuild.reply" /> |
|---|
| 175 |
<then> |
|---|
| 176 |
<echo message="========================================================" /> |
|---|
| 177 |
<echo message="Note:" /> |
|---|
| 178 |
<echo message="${user.home}/bwbuild was left unchanged. You may need" /> |
|---|
| 179 |
<echo message="to update it for this release." /> |
|---|
| 180 |
<echo message="========================================================" /> |
|---|
| 181 |
</then> |
|---|
| 182 |
</if> |
|---|
| 183 |
</target> |
|---|
| 184 |
</project> |
|---|