mirror of
https://github.com/viq/NewsBlur.git
synced 2025-04-13 09:38:09 +00:00
Adding sshdo options to connect to old cluster.
This commit is contained in:
parent
aafe61d079
commit
5be06eefd3
2 changed files with 9 additions and 2 deletions
|
@ -9,6 +9,8 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'newsblur_web.settings'
|
|||
|
||||
if __name__ == '__main__':
|
||||
doapi = digitalocean.Manager(token=settings.DO_TOKEN_SSH)
|
||||
if len(sys.argv) > 2 and sys.argv[2] == "old":
|
||||
doapi = digitalocean.Manager(token=settings.DO_TOKEN_FABRIC)
|
||||
droplets = doapi.get_all_droplets()
|
||||
for droplet in droplets:
|
||||
if sys.argv[1] == droplet.name:
|
||||
|
|
|
@ -18,6 +18,11 @@ LPURPLE='\033[01;35m'
|
|||
LCYAN='\033[01;36m'
|
||||
WHITE='\033[01;37m'
|
||||
|
||||
ipaddr=`python /srv/newsblur/utils/hostname_ssh.py $1`
|
||||
ipaddr=`python /srv/newsblur/utils/hostname_ssh.py $1 $2`
|
||||
printf "\n ${BLUE}---> ${LBLUE}Connecting to ${LGREEN}$1${BLUE} / ${LRED}$ipaddr${BLUE} <--- ${RESTORE}\n\n"
|
||||
if [ "$2" == "old" ];
|
||||
then
|
||||
ssh -l sclay -i /srv/secrets-newsblur/keys/newsblur.key $ipaddr
|
||||
else
|
||||
ssh -l nb -i /srv/secrets-newsblur/keys/docker.key $ipaddr
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue