Last active
December 22, 2016 12:50
-
-
Save mdpuma/8adc9510fa06ebe29a5db2c040a915bf to your computer and use it in GitHub Desktop.
vesta useful commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| TTL=600 | |
| USERS="`/usr/local/vesta/bin/v-list-users plain | awk '{ print $1 }'`" | |
| for user in $USERS; do | |
| /usr/local/vesta/bin/v-list-dns-domains $user plain | awk '{ print $1 }' | xargs -I{} v-change-dns-domain-ttl $user {} $TTL | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| OLDIP=1.1.1.1 | |
| NEWIP=2.2.2.2 | |
| USERS="`/usr/local/vesta/bin/v-list-users plain | awk '{ print $1 }'`" | |
| for user in $USERS; do | |
| /usr/local/vesta/bin/v-list-web-domains $user plain | grep $OLDIP | awk '{ print $1 }' | while read domain; do | |
| /usr/local/vesta/bin/v-change-dns-domain-ip $user $domain $NEWIP | |
| /usr/local/vesta/bin/v-change-web-domain-ip $user $domain $NEWIP | |
| done | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment