Browse Source

Fixing syntax for schell script checking

pull/706/head
Pål Håland 8 years ago
parent
commit
8a604bd2a1
  1. 20
      deploy/routeros.sh

20
deploy/routeros.sh

@ -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
}
Loading…
Cancel
Save