More fixes for install-gp.sh
This commit is contained in:
@@ -6,25 +6,18 @@ show_help() {
|
||||
echo "Options:"
|
||||
echo " --help | -h (Optional) Display help information on how to use this script"
|
||||
echo " --version | --version (Required) Specify the GP version to install"
|
||||
echo ""
|
||||
echo " --no-download | --no-dl (Optional) Make the script not download the files from Artifactory"
|
||||
echo " --no-webmap | --no-wm (Optional) Make the script not install the WebMap module"
|
||||
echo " --no-gp | --no-gp (Optional) Make the script not install GP"
|
||||
echo " --install-apache (Optional) Make the script install the Apache dependency for WebMap module"
|
||||
}
|
||||
|
||||
function test_data() {
|
||||
version='10.30.500.0.0-NEOCAD-T07'
|
||||
should_download=false
|
||||
should_install_webmap=true
|
||||
should_install_apache=true
|
||||
should_install_gp=true
|
||||
echo " --no-server | --no-svr (Optional) Make the script not install GP server"
|
||||
echo " --webmap | --wm (Optional) Make the script install the WebMap module"
|
||||
echo " --apache (Optional) Make the script install the Apache dependency for WebMap module"
|
||||
}
|
||||
|
||||
version=''
|
||||
should_download=true
|
||||
should_install_webmap=true
|
||||
should_install_apache=false
|
||||
should_install_gp=true
|
||||
should_install_geoserver=false
|
||||
should_install_apache=false
|
||||
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
@@ -40,15 +33,11 @@ while [ "$#" -gt 0 ]; do
|
||||
should_download=false
|
||||
shift
|
||||
;;
|
||||
--no-webmap | --no-wm)
|
||||
should_install_webmap=false
|
||||
--no-server | --no-svr)
|
||||
should_install_geoserver=false
|
||||
shift
|
||||
;;
|
||||
--no-gp | --no-gp)
|
||||
should_install_gp=false
|
||||
shift
|
||||
;;
|
||||
--install-apache)
|
||||
--apache)
|
||||
should_install_apache=true
|
||||
shift
|
||||
;;
|
||||
@@ -137,6 +126,12 @@ validate_repo_script $script_explode_java_files_filename
|
||||
script_disable_dbversion_check_filename='disable-dbversion-check-on-software-info-file.sh'
|
||||
validate_repo_script $script_disable_dbversion_check_filename
|
||||
|
||||
NEOCAD_INSTALLATION=false
|
||||
|
||||
if [[ $version == *"NEOCAD"* ]]; then
|
||||
NEOCAD_INSTALLATION=true
|
||||
fi
|
||||
|
||||
# download files
|
||||
base_url='artifactory.cpqd.com.br/artifactory'
|
||||
gp_maven_repo=$(get_maven_repo $version)
|
||||
@@ -171,7 +166,7 @@ cp $HOME/documents/ambients-gp/zips/* .
|
||||
WILDFLY_WEB_FILENAME="wildfly-8*.zip"
|
||||
WILDFLY_MSGS_FILENAME="wildfly-21*.zip"
|
||||
|
||||
if ! $should_install_webmap; then
|
||||
if ! $should_install_geoserver; then
|
||||
rm $WILDFLY_MSGS_FILENAME
|
||||
fi
|
||||
|
||||
@@ -237,8 +232,8 @@ if $should_install_gp; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! $should_install_webmap; then
|
||||
echo "[INFO] Skipping WebMap installation..."
|
||||
if ! $should_install_geoserver; then
|
||||
echo "[INFO] Skipping GeoServer/WebMap installation..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -276,11 +271,8 @@ fi
|
||||
|
||||
msgs_version=$(xmlstarlet sel -N pom="http://maven.apache.org/POM/4.0.0" -t -v '/pom:project/pom:properties/pom:cpqd.msgs.version' $cdk_superparent_pom_filename)
|
||||
|
||||
NEOCAD_INSTALLATION=false
|
||||
|
||||
if [[ $version == *"NEOCAD"* ]]; then
|
||||
if [ NEOCAD_INSTALLATION ]; then
|
||||
# msgs_version='4.0.4-SNAPSHOT'
|
||||
NEOCAD_INSTALLATION=true
|
||||
msgs_version='4.0.3'
|
||||
fi
|
||||
|
||||
@@ -337,9 +329,8 @@ $msgs_package_dir/geoserverConfigurator/bin/setup.sh
|
||||
|
||||
GEOSERVER_BIN_FILENAME=runstandalone.sh
|
||||
|
||||
unzip -qq -d $WILDFLY_GEOSERVER_DIRNAME/standalone server/installation/deployments/mapserver/mapserver-geoserver-data_dir.zip
|
||||
if [ ! $NEOCAD_INSTALLATION ]; then
|
||||
unzip -qq -d $WILDFLY_GEOSERVER_DIRNAME/standalone server/installation/deployments/mapserver/mapserver-geoserver-data_dir.zip
|
||||
|
||||
# TODO, quebra aqui
|
||||
unzip -qq -d $WILDFLY_GEOSERVER_DIRNAME/standalone/data_dir/www/map $msgs_map_filename
|
||||
else
|
||||
@@ -348,7 +339,7 @@ fi
|
||||
|
||||
GEOSERVER_BIN=$WILDFLY_GEOSERVER_DIRNAME/bin/$GEOSERVER_BIN_FILENAME
|
||||
|
||||
sed -i 's/8788/8789/g' $GEOSERVER_BIN
|
||||
# sed -i 's/8788/8789/g' $GEOSERVER_BIN
|
||||
|
||||
find $WILDFLY_GEOSERVER_DIRNAME -type f -name '*.sh' -exec chmod +x {} \;
|
||||
|
||||
@@ -369,6 +360,7 @@ if $should_install_apache; then
|
||||
sudo sed -i 's/Listen 80/Listen 8808/g' $apache2portsconf_filepath
|
||||
|
||||
apache2proxyconf_filepath='/etc/apache2/mods-enabled/proxy.conf'
|
||||
|
||||
text_to_add=("ProxyPreserveHost On"
|
||||
"ProxyPass /cpqd/ http://$hostname:8180/cpqd/"
|
||||
"ProxyPassReverse /cpqd/ http://$hostname:8180/cpqd/"
|
||||
|
||||
Reference in New Issue
Block a user