awips2/deltaScripts/14.3.1/datadelivery/updateSubscriptionOwners.sh
Dave Hladky 3b00ae03cc Issue #2992 Updated DD list of active registries
Change-Id: Iaef7dc76442d1e101cf9865a542a777afe1722ca

Former-commit-id: a34955102d1316135c4151210daba0e5807ff6c9
2014-04-30 17:38:28 -05:00

28 lines
No EOL
958 B
Bash

#!/bin/bash
#
# DO NOT RUN THIS SCRIPT UNLESS YOU READ THIS!!!!!!!!!!!!!!!
# This update needs to be performed with build 14.3.1.
# This update is only for edex servers which have run DD and have subscriptions loaded.
# FIRST! Backup your subscriptions from the Registry Web Interface,
# http://$REGISTRY_HOST:8082/registry/RegistryInterface.html. <Backup All Subscriptions>
# Then run this update script, after script runs, <Restore Subscriptions>
# That will update the subscriptions to reflect the correct ownership at the registry level.
echo ""
echo "Press Enter to perform the updates Ctrl-C to quit."
read done
files=`find /awips2/edex/data/registrySubscriptionBackup -iname \*-RECURRING`
if [[ -z "$files" ]]; then
echo "FATAL: Update Subscriptions has Failed, No subscription backup files found!"
exit 1
fi
for f in $files; do
echo Updating $f
bf=$f.bak.`date +%m%d%y`
cp $f $bf
perl updateSubscriptionOwners.pl $f;
done