Skip to content

Instantly share code, notes, and snippets.

@brunoalmeida406
Last active December 13, 2015 19:08
Show Gist options
  • Save brunoalmeida406/4960311 to your computer and use it in GitHub Desktop.
Save brunoalmeida406/4960311 to your computer and use it in GitHub Desktop.
#!/bin/bash
host_slave=`mysql -h'Endpoint do Banco de dados' -u'Usuário' –p’Senha’ -e "select hostname
from cluster_redis.servidores where nome='secundario';" | sed 1d`
#Limpa fila remota
ssh -o 'StrictHostKeyChecking no' redis@$host_slave '/usr/local/sbin/limpa_fila.sh'
#Fim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment