Portal Modelo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
597 B

#!/bin/bash
if [ -z "$2" ]
then
echo "Copia um arquivo do diretório local para um container de portal modelo"
echo ""
echo "Como primeiro argumento, passe o municipio e estado, separado por traço: saojoaobatista-ma"
echo "Como segundo argumento, passe o nome do arquivo, sem a extensão .zexp"
exit 1
fi
municipio="$1"
arquivo="$2"
pod=$(rancher kubectl get pods -n "$1" | grep -io -- "^.*-plone-[0-9a-z-]*")
echo "Copiando arquivo $arquivo.zexp desta máquina para o pod $pod"
echo ""
rancher kubectl cp ./$arquivo.zexp "$municipio"/"$pod":/data/instance/$arquivo.zexp