Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
605a71da
Commit
605a71da
authored
Aug 25, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rooter: add vzubc support
parent
44c7200e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
get_vzubc.sh
rooter/get_vzubc.sh
+23
-0
rooter.sh
rooter/rooter.sh
+6
-1
No files found.
rooter/get_vzubc.sh
0 → 100755
View file @
605a71da
#!/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
rooter/rooter.sh
View file @
605a71da
...
...
@@ -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
$*
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment