Commit 605a71da authored by Vitaly Lipatov's avatar Vitaly Lipatov

rooter: add vzubc support

parent 44c7200e
#!/bin/sh
# Print vzubc
. $(dirname "$0")/config || exit
fatal()
{
echo "Error: $@" >&2
exit 1
}
fastssh()
{
ssh -o "ControlMaster auto" -o "ControlPath ~/tmp/ssh_mux_%h_%p_%r" -o "ControlPersist 4h" "$@"
}
[ "$UID" = 0 ] || fatal "Run me only as root"
HOST="$1"
VEID="$2"
fastssh "root@$HOST" $SUDO vzubc -c $VEID
......@@ -4,7 +4,7 @@
fatal()
{
echo "Error: $@"
echo "Error: $@" >&2
exit 1
}
......@@ -20,6 +20,7 @@ case "$1" in
echo "Available commands:"
echo " pubkey USER"
echo " vzlist HOST"
echo " vzubc HOST VEID"
echo " hostlist"
echo " hostconfig"
echo " iptables"
......@@ -47,6 +48,10 @@ case "$1" in
shift
sudo /home/rooter/bin/get_vzlist.sh "$@"
;;
"vzubc")
shift
sudo /home/rooter/bin/get_vzubc.sh "$@"
;;
*)
echo "Etersoft rooter (c) 2015"
echo "Unknown command $*"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment