Changed sendlist keyword u (update) to c (command) for clarification
Starting output for sendkey improved
This commit is contained in:
30
seqs/ssh.sh
30
seqs/ssh.sh
@@ -26,7 +26,13 @@ step_3() {
|
||||
exe ssh-keygen -b 4096 -t rsa -C "$(hostname)" -N "" -f $(realpath $toolIdentity)
|
||||
}
|
||||
|
||||
step_5_info() { echo "Send key to remote host <USER@HOST> [PORT]"; }
|
||||
step_5_info() {
|
||||
local userHost="<USER@HOST>"
|
||||
local userPort=" [PORT]"
|
||||
if [ ! -z $2 ] ; then userHost="$2"; userPort=":22"; fi
|
||||
if [ ! -z $3 ] ; then userPort=":$3"; fi
|
||||
echo "Send key to remote host ${userHost}$userPort"
|
||||
}
|
||||
step_5_alias() { ALIAS="sendkey"; }
|
||||
step_5() {
|
||||
local sshPort=22
|
||||
@@ -65,22 +71,22 @@ step_10() {
|
||||
# Parse a list to transfer files and/or execute commands on one or different hosts
|
||||
#
|
||||
# List format
|
||||
# <COMMAND h,f,u>|<STRING>|[STRING2]|[OPTIONS]
|
||||
# COMMAND h|H|host - Change user@host:port for the following ssh/scp commands
|
||||
# f|F|file - Source- and destination file path combination
|
||||
# u|U|update - Execute command on the remote host
|
||||
# <COMMAND h,f,c>|<STRING>|[STRING2]|[OPTIONS]
|
||||
# COMMAND h|H|host - Change user@host:port for the following ssh/scp commands
|
||||
# f|F|file - Source- and destination file path combination
|
||||
# c|C|command - Execute command on the remote host
|
||||
#
|
||||
# STRING h - user@host
|
||||
# f - source file path
|
||||
# u - shell command string
|
||||
# c - shell command string
|
||||
#
|
||||
# STRING2 h - port
|
||||
# f - destination file path
|
||||
# u - not used
|
||||
# c - not used
|
||||
#
|
||||
# OPTIONS h - not used
|
||||
# f - Options passed to scp
|
||||
# u - not used
|
||||
# c - not used
|
||||
#
|
||||
parseList() {
|
||||
local errorMsg=""
|
||||
@@ -138,7 +144,7 @@ parseList() {
|
||||
errorMsg="scp to $aHost failed with $?"
|
||||
fi
|
||||
;;
|
||||
u|U|update)
|
||||
c|C|command)
|
||||
if [ -z "$aHost" ] || [ "$aHost" == "" ]; then
|
||||
errorMsg="No host found"
|
||||
saveReturn 1
|
||||
@@ -175,12 +181,12 @@ h|user@host2|port2
|
||||
f|/sourcedir/sourcefile|/destdir/destfile
|
||||
# copy source recursively
|
||||
f|/sourcedir/sourcefile/dir|/destdir/destfile|-r
|
||||
u|/destdir/updatescript.sh
|
||||
c|/destdir/updatescript.sh
|
||||
# host is changed and port set to default 22 for the following lines
|
||||
h|user@host
|
||||
f|/sourcedir/sourcefile|/destdir/destfile
|
||||
f|/sourcedir/sourcefile|/destdir/destfile
|
||||
u|/destdir2/update.sh"
|
||||
c|/destdir2/update.sh"
|
||||
|
||||
VERSION_SEQREV=6
|
||||
VERSION_SEQREV=10
|
||||
. sequencer.sh
|
||||
|
Reference in New Issue
Block a user