Fixing syntax for schell script checking

This commit is contained in:
Pål Håland 2017-03-06 19:39:55 +01:00
parent b8a8e2280d
commit 8a604bd2a1

View File

@ -31,38 +31,40 @@ routeros_deploy() {
fi
_info "Trying to push key '$_ckey' to router"
scp $_ckey $ROUTER_OS_USERNAME@$ROUTER_OS_HOST:$_cdomain".key"
scp "$_ckey" "$ROUTER_OS_USERNAME@$ROUTER_OS_HOST:$_cdomain.key"
_info "Trying to push cert '$_ccert' to router"
scp $_ccert $ROUTER_OS_USERNAME@$ROUTER_OS_HOST:$_cdomain".cer"
scp "$_ccert" "$ROUTER_OS_USERNAME@$ROUTER_OS_HOST:$_cdomain.cer"
_info "Trying to push ca cert '$_cca' to router"
scp $_cca $ROUTER_OS_USERNAME@$ROUTER_OS_HOST:$_cdomain".ca"
ssh $ROUTER_OS_USERNAME@$ROUTER_OS_HOST bash -c "'
scp "$_cca" "$ROUTER_OS_USERNAME@$ROUTER_OS_HOST:$_cdomain.ca"
# shellcheck disable=SC2029
ssh "$ROUTER_OS_USERNAME@$ROUTER_OS_HOST" bash -c "'
/certificate remove $_cdomain.cer_0
/certificate remove $_cdomain.cer_1
/certificate remove $_cdomain.ca_0
delay 1
/certificate import file-name=$_cdomain.cer passphrase=\"\"
/certificate import file-name=$_cdomain.ca passphrase=\"\"
/certificate import file-name=$_cdomain.key passphrase=\"\"
/certificate import file-name=$_cdomain.ca passphrase=\"\"
delay 1
/file remove $_cdomain.cer
/file remove $_cdomain.key
/file remove $_cdomain.ca
delay 2
/ip service set www-ssl certificate=$_cdomain.cer_0
'"
return 0
}