diff --git a/DOCKER_HUB.md b/DOCKER_HUB.md index 98374e0..52da8ec 100644 --- a/DOCKER_HUB.md +++ b/DOCKER_HUB.md @@ -8,7 +8,7 @@ # Featured tags -- `latest`, `23.0.x` +- `latest` # Quick reference diff --git a/vrt.sh b/vrt.sh index 2560179..99ec377 100755 --- a/vrt.sh +++ b/vrt.sh @@ -24,7 +24,8 @@ set -e # horodatage pour commentaires DATE=$(date "+%A %d/%m/%Y %H:%M:%S") - +rm -f ${SOURCEDIR}/vrtbot.log +touch ${SOURCEDIR}/vrtbot.log if [ -n "$(ls -A $SOURCEDIR 2>/dev/null)" ] then @@ -33,21 +34,21 @@ DATE=$(date "+%A %d/%m/%Y %H:%M:%S") # cycle vrt for vrt in *.vrt; do - echo "import de ${SOURCEDIR}/${vrt} dans le schema ${ACTIVESCHEMA} de la base ${PGDATABASE}" + echo "import de ${SOURCEDIR}/${vrt} dans le schema ${ACTIVESCHEMA} de la base ${PGDATABASE}" | tee -a vrtbot.log /usr/bin/ogr2ogr \ -f Postgresql \ -overwrite \ - PG:"active_schema=${ACTIVESCHEMA}" "${vrt}" -lco SCHEMA=${ACTIVESCHEMA} -lco OVERWRITE=yes -lco GEOMETRY_NAME=geometry -nlt PROMOTE_TO_MULTI -lco DESCRIPTION="import par ${JOB_NAME}/${BUILD_NUMBER} le ${DATE} - ${SOURCEDIR}/${vrt}" + PG:"active_schema=${ACTIVESCHEMA}" "${vrt}" -lco SCHEMA=${ACTIVESCHEMA} -lco OVERWRITE=yes -lco GEOMETRY_NAME=geometry -nlt PROMOTE_TO_MULTI -lco DESCRIPTION="import par ${JOB_NAME}/${BUILD_NUMBER} le ${DATE} - ${SOURCEDIR}/${vrt}" 2>&1 | tee -a vrtbot.log # post import sql if [ -f "${vrt}.sql" ]; then - echo "script sql après import trouvé" + echo "script sql après import trouvé" | tee -a vrtbot.log source "settings" - psql -f "${vrt}.sql" - echo "script sql après import exécuté" + psql -f "${vrt}.sql" | tee -a vrtbot.log + echo "script sql après import exécuté" | tee -a vrtbot.log fi done else - echo "${SOURCEDIR} n'existe pas" + echo "${SOURCEDIR} n'existe pas" | tee -a vrtbot.log fi