This website works better with JavaScript.
Home
Help
Sign In
Open6Hosting
/
smartos-bin
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
subo script para trabajar con el API
master
Pablo Sarria
2 years ago
parent
a56c2c53a5
commit
c22e38dbd0
2 changed files
with
15 additions
and
0 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+9
-0
alias_vps.sh
+6
-0
update_alias_vps.sh
+ 9
- 0
alias_vps.sh
View File
@@ -0,0 +1,9 @@
#!/bin/bash
UUID=$1
for a in $(zoneadm list -n); do
UUID=$a
ZONEALIAS=`zonecfg -z ${UUID} info attr name=alias | awk '$1 ~ /value:/ { print $2 }' | openssl base64 -d`
IP=`zonecfg -z ${UUID} info net | awk '$2 ~ /ips/ { print $2 }' | awk -F\" '{ print $2 }' | sed 's/,/ /'`
echo ${UUID} ${ZONEALIAS} ${IP}
done
+ 6
- 0
update_alias_vps.sh
View File
@@ -0,0 +1,6 @@
#!/bin/bash
UUID=$1
ALIAS=$2
NEWALIAS=`echo ${ALIAS} | tr -d '\n' | openssl base64`
zonecfg -z ${UUID} "select attr name=alias; set value=\"${NEWALIAS}\";end"
Write
Preview
Loading…
Cancel
Save