#!/bin/bash

ooss_dest_list=(tc-sh seoul-1)
ooss_dest_list=(seoul-1)


function set_oss_alias()
{
    #    /usr/local/bin/mc alias set local http://10.250.0.100:9000 cmii B#923fC7mk
#    /usr/local/bin/mc alias set tc-sh http://42.192.52.227:9000 cmii B#923fC7mk
    /usr/local/bin/mc alias set seoul-1 https://cnk8d6fazu16.compat.objectstorage.ap-seoul-1.oraclecloud.com aed62d24d85e2da809ce02bf272420ba4ed74820 rQdEcn69K049+JkA1IGoQmC1k8zma8zfWvZvVS0h144=
}

function do_sync(){

    for dest in ${ooss_dest_list[@]};do
        echo "[do_sync] - start to sync to $dest"
        /usr/local/bin/mc cp /root/wddproject/shell-scripts/1-代理Xray/98-subscribe-clash.yaml  ${dest}/seoul/
        /usr/local/bin/mc cp /root/wddproject/shell-scripts/1-代理Xray/99-subscribe-octopus-latest.txt  ${dest}/seoul/
        echo "[do_sync] - end to sync to $dest"
        echo ""
    done
}

set_oss_alias
do_sync

echo "[sync-proxy-config] - done !"

