aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-07-08 17:51:42 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-07-08 17:51:42 +0200
commit40f62cb1788902414847a8c5905e24e8604814dd (patch)
tree1a4781c80e8e4162aa4f9fb7fadebc6448235aee
parentTree update (diff)
downloadjoe-scripts-40f62cb1788902414847a8c5905e24e8604814dd.tar.gz
joe-scripts-40f62cb1788902414847a8c5905e24e8604814dd.tar.bz2
joe-scripts-40f62cb1788902414847a8c5905e24e8604814dd.tar.xz
joe-scripts-40f62cb1788902414847a8c5905e24e8604814dd.tar.zst
joe-scripts-40f62cb1788902414847a8c5905e24e8604814dd.zip
Update
-rwxr-xr-xsrc/vps-do.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vps-do.pl b/src/vps-do.pl
index 2ce11ff..847d7db 100755
--- a/src/vps-do.pl
+++ b/src/vps-do.pl
@@ -16,6 +16,7 @@ sub main {
my $called_script = '';
my $word = '';
my $ssh_boy = 'root@jozanleclerc.xyz';
+ my $argv_line = '';
if (
$ARGV[0] eq 'addsshkey' ||
$ARGV[0] eq 'adduser' ||
@@ -55,6 +56,7 @@ sub main {
print "Arguments:\n";
my $i = 1;
while ($i < $argc) {
+ $argv_line = $argv_line . ' "' . $ARGV[$i] . '"';
print colored($ARGV[$i], 'bold yellow') . "\n";
$i += 1;
}
@@ -64,10 +66,10 @@ sub main {
system(
$dash,
'-c',
- 'ssh ' . $ssh_boy . " << EOF 2>&1
-ls -lh
-uname -n
+ 'ssh ' . $ssh_boy . " << EOF
+" . $called_script . $argv_line . "
exit
+EOF
"
);
exit;