Commit 9043247d authored by Matteo Quintiliani's avatar Matteo Quintiliani
Browse files

Improvements and added gaia-cda


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@1302 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent ffe89b7e
Loading
Loading
Loading
Loading
+11 −3
Original line number Original line Diff line number Diff line
@@ -14,7 +14,7 @@ NAQSERVERS="naqs1a.int.ingv.it naqs2a.int.ingv.it naqs1b.int.ingv.it naqs2b.int.
NAQSPORT=28000
NAQSPORT=28000
DATAPORT=28002
DATAPORT=28002


SLSERVERS="hsl2.int.ingv.it"
SLSERVERS="hsl2.int.ingv.it gaia-cda1.int.ingv.it gaia-cda2.int.ingv.it gaia-cda3.int.ingv.it"
SLPORT=18000
SLPORT=18000


for NAQSSERVER in ${NAQSERVERS}; do
for NAQSSERVER in ${NAQSERVERS}; do
@@ -22,10 +22,18 @@ for NAQSSERVER in ${NAQSERVERS}; do
done
done


for DATASERVER in ${DATASERVERS}; do
for DATASERVER in ${DATASERVERS}; do
    ${NMXPTOOLBIN} -H ${DATASERVER} -P ${DATAPORT} -l | sed -e "s/[ ][ ]*/ /g" | cut -f 3 -d' ' | tr '.' ' ' | sed -e "s/\([^ ][^ ]*\) \([^ ][^ ]*\)/CALL sp_update_channel_acquisition('', '\1', '\2', '', 0, '${DATASERVER}', ${DATAPORT}, 'DataServer');/"
    ${NMXPTOOLBIN} -H ${DATASERVER} -D ${DATAPORT} -l | sed -e "s/[ ][ ]*/ /g" | cut -f 3 -d' ' | tr '.' ' ' | sed -e "s/\([^ ][^ ]*\) \([^ ][^ ]*\)/CALL sp_update_channel_acquisition('', '\1', '\2', '', 0, '${DATASERVER}', ${DATAPORT}, 'DataServer');/"
done
done




for SLSERVER in ${SLSERVERS}; do
for SLSERVER in ${SLSERVERS}; do
    ${SLINKTOOLBIN} -Q ${SLSERVER}:${SLPORT} | grep " D " | sed -e "s/[ ][ ]*/ /g" | sed -e "s/\([^ ][^ ]*\) \([^ ][^ ]*\) \([^ ][^ ]*\) \([^ ]\) .*$/CALL sp_update_channel_acquisition('\1', '\2', '\3', '', 0, '${SLSERVER}', ${SLPORT}, 'SeedLink');/g"

    # BRUTAL calls for hsl1.int.ingv.it
    if [ "${SLSERVER}" == "hsl2.int.ingv.it" ]; then
	${SLINKTOOLBIN} -Q ${SLSERVER}:${SLPORT} | grep " D " | gsed -r "~ s/^(.{9})([ ]{2})/\1--/" | sed -e "s/[ ][ ]*/ /g" | sed -e "s/\([^ ][^ ]*\) \([^ ][^ ]*\) \([^ ][^ ]*\) \([^ ][^ ]*\).*$/CALL sp_update_channel_acquisition('\1', '\2', '\4', '\3', 0, 'hsl1.int.ingv.it', ${SLPORT}, 'SeedLink');/g"
    fi

    ${SLINKTOOLBIN} -Q ${SLSERVER}:${SLPORT} | grep " D " | gsed -r "~ s/^(.{9})([ ]{2})/\1--/" | sed -e "s/[ ][ ]*/ /g" | sed -e "s/\([^ ][^ ]*\) \([^ ][^ ]*\) \([^ ][^ ]*\) \([^ ][^ ]*\).*$/CALL sp_update_channel_acquisition('\1', '\2', '\4', '\3', 0, '${SLSERVER}', ${SLPORT}, 'SeedLink');/g"

done
done