#!/bin/sh

# ensure WIN senders have application_description field
for cfg in /etc/win-out/*.local
do
	[ -e "${cfg}" ] || continue
	if [ "`basename ${cfg}`" != "`basename ${cfg} .ctl.local`" ]
	then
		continue
	fi


	if [ -z "`gcs_rwvar "gcs_get_varcf2" "application_description" "${cfg}" ""`" ]
	then
		echo " * Updating ${cfg}"
		inst="`basename ${cfg} .local`"
		. "/etc/win-out/${inst}.ctl.local"
		gcs_rwvar "gcs_set_varcf2" "application_description" "${cfg}" "${DESC}" ""
	fi
done
