Former-commit-id:133dc97f67
[formerlya02aeb236c
] [formerly9f19e3f712
] [formerly133dc97f67
[formerlya02aeb236c
] [formerly9f19e3f712
] [formerly06a8b51d6d
[formerly9f19e3f712
[formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]]] Former-commit-id:06a8b51d6d
Former-commit-id:9bb8decbcf
[formerly8e80217e59
] [formerly377dcd10b9
[formerly3360eb6c5f
]] Former-commit-id:377dcd10b9
Former-commit-id:e2ecdcfe33
34 lines
831 B
Bash
34 lines
831 B
Bash
#!/bin/bash
|
|
# This script will drop the fog table and remove the fog hdf5 files.
|
|
#
|
|
# This update needs to be performed with build 11.9.0-3.
|
|
#
|
|
|
|
PSQL="/awips2/psql/bin/psql"
|
|
SQL_COMMAND="DROP TABLE IF EXISTS fog; UPDATE plugin_info SET initialized='false' WHERE name='fog';"
|
|
|
|
if [ ! -f ${PSQL} ]; then
|
|
echo "ERROR: The PSQL executable does not exist - ${PSQL}."
|
|
echo "FATAL: Updated Failed!"
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
echo "Press Enter to perform the updates Ctrl-C to quit."
|
|
read done
|
|
|
|
echo "INFO: Dropping the metadata fog table."
|
|
${PSQL} -U awips -d metadata -c "${SQL_COMMAND}"
|
|
if [ $? -ne 0 ]; then
|
|
echo "FATAL: Updated Failed!"
|
|
exit 1
|
|
fi
|
|
|
|
echo "INFO: Purging fog hdf5 files."
|
|
if [ -d /awips2/edex/data/hdf5/fog ]; then
|
|
rm -rfv /awips2/edex/data/hdf5/fog
|
|
fi
|
|
|
|
echo "INFO: The update was successfully applied."
|
|
|
|
exit 0
|