Changeset - d7197ecf1533
[Approved]
metalgamer
0 1 0
Dennis Fink - 23 months ago 2022-06-08 22:26:00
dennis.fink@c3l.lu
Double quote to prevent globbing and word splitting.

https://www.shellcheck.net/wiki/SC2086
1 file changed with 1 insertions and 1 deletions:
init.sh
1
1
2 comments (0 inline, 2 general)
init.sh
Show inline comments
 
@@ -6,13 +6,13 @@ generateKey() {
 
	rm sshKey
 
	rm sshKey.pub
 
	ssh-keygen -t ed25519 -f ./sshKey -q -N "" -C ""
 
}
 

	
 
deployKey() {
 
	sshpass -p alarm ssh-copy-id -i ./sshKey.pub -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PubkeyAuthentication=false alarm@$1
 
	sshpass -p alarm ssh-copy-id -i ./sshKey.pub -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o PubkeyAuthentication=false alarm@"$1"
 
}
 

	
 
# If keys are present, we just need to deploy it and destroy the SSH Agent
 
# Otherwise, we genrate a key and then deploy it
 
# The key can be present on the remote host multiple times,
 
# -> not a big issue, just not clean, but it works
Dennis Fink (metalgamer) 1 year and 11 months ago comment on pull request "Fixed some shellcheck warnings"

Status change: Under review

x 1 year and 11 months ago comment on pull request "Fixed some shellcheck warnings"

Status change: Approved

Answer is "ok" (via Matrix chat)
2 comments (0 inline, 2 general)