Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)

Paste

Pasted as Bash by registered user uwe ( 13 years ago )
#!/bin/bash

lst=${1:-liste}
umgebung=a.ol.dvag.com
key=XYZ

c=0
while read uid; do
    echo "$(date +%F-%T) init $uid"
    e="$(ssh cloudappa01.$umgebung sudo -u tomcat5 -i sh /usr/local/veritasfs/appsrvcloudA0/auroraCloudUsercommands.sh INIT_VB $uid $key 2>/dev/null)"
    echo "$e" | grep -q "ResultCode.:.OK"
    if [ $? -ne 0 ]; then
        echo "$(date +%F-%T) FAIL $uid - $e" | tr -d \\n
        echo
        continue
    fi
    echo "$(date +%F-%T) wait $uid"
    ssh cloudstoragea01.$umgebung 'while :; do e=$(curl -s http://cloudstoragea01.'$umgebung:8098/riak/ac.$uid.v3.1/SYNC_STATUS_$uid'); echo $(date +%F-%T) stat '$uid' - $e; if [ "$e" == "INIT_DONE" ]; then break; else sleep 5; fi; done'
done < $lst

 

Revise this Paste

Your Name: Code Language: