19787c557b2d47018d925e3ebbb9486d73ec7532
downloads/sbmigrate-site
... | ... | @@ -57,8 +57,8 @@ else |
57 | 57 | echo "This script will migrate the site configuration" |
58 | 58 | echo "for your SBGrid installation. You will be able to" |
59 | 59 | echo "confirm your settings before the migration happens." |
60 | - echo "You may need the new site name that was sent by email" |
|
61 | - echo "if your advisor is not listed below." |
|
60 | + echo "You may need the confirm site name by email if your" |
|
61 | + echo "advisor is not listed below at accounts@sbgrid.org" |
|
62 | 62 | echo "The process will be fast and will not impact running jobs." |
63 | 63 | echo |
64 | 64 | echo "Exit at any time with a CTRL-c." |
... | ... | @@ -109,7 +109,7 @@ echo " $install_sitename" |
109 | 109 | echo " " |
110 | 110 | |
111 | 111 | read confirmation |
112 | -if [ $confirmation == Y ] || [ $confirmation == y ] ; then |
|
112 | +if [ $confirmation == "Y" ] || [ $confirmation == "y" ] ; then |
|
113 | 113 | echo "Great. Migrating this installation." |
114 | 114 | echo " " |
115 | 115 | else |
... | ... | @@ -163,8 +163,32 @@ fi |
163 | 163 | mv -vf $DATABASE $NEWDATABASE |
164 | 164 | if [ $? == 0 ]; then |
165 | 165 | echo "Database move successful" |
166 | - echo "Migration complete!." |
|
166 | +else |
|
167 | + echo "error in database move, exiting" |
|
168 | + exit 1 |
|
169 | +fi |
|
170 | + |
|
171 | +#check results |
|
172 | +if [ $(uname) == "Darwin" ] ; then |
|
173 | + sbgridcmd="/programs/i386-mac/sbgrid_installer/latest/sbgrid-cli info sbgrid-installer" |
|
174 | +elif [ $(uname) == "Linux" ] ; then |
|
175 | + sbgridcmd="/programs/i386-mac/sbgrid_installer/latest/sbgrid-cli info sbgrid-installer" |
|
176 | +else |
|
177 | + echo "unknown OS. No validation run." |
|
178 | +fi |
|
179 | + |
|
180 | +echo "Checking post migration configuration ..." |
|
181 | +$sbgridcmd |
|
182 | +sbgrid_exit=$? |
|
167 | 183 | |
184 | +echo " " |
|
185 | +echo "------------------------------" |
|
186 | +if [ $sbgrid_exit == 0 ] ; then |
|
187 | + echo " " |
|
188 | + echo " " |
|
189 | + echo "Test appears to have succeeded!" |
|
190 | + echo "Migration complete!" |
|
168 | 191 | else |
169 | - echo "error in database move" |
|
192 | + echo "Migration complete but post install test failed." |
|
193 | + echo "Please send any errors you see above to bugs@sbgrid.org" |
|
170 | 194 | fi |