Skip to content

Commit

Permalink
Revert "fixed line breaks and quotation marks"
Browse files Browse the repository at this point in the history
This reverts commit faa84a4.
  • Loading branch information
herbetom committed Jul 29, 2019
1 parent faa84a4 commit ff2ce93
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions deploy/routeros.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env sh

# Here is a script to deploy cert to routeros router.
# Deploy the cert to remote routeros
Expand Down Expand Up @@ -144,21 +144,21 @@ routeros_deploy() {
return 1
fi

DEPLOY_SCRIPT_CMD="/system script add name=\"LE Cert Deploy - $_cdomain\" owner=admin policy=ftp,read,write,password,sensitive \
source=\"## generated by routeros deploy script in acme.sh\r\n\
\r\n /certificate remove [ find name=$_cdomain.cer_0 ]\
\r\n /certificate remove [ find name=$_cdomain.cer_1 ]\
\r\n delay 1\
\r\n /certificate import file-name=$_cdomain.cer passphrase=\\\"\\\"\
\r\n /certificate import file-name=$_cdomain.key passphrase=\\\"\\\"\
\r\n delay 1\
\r\n /file remove $_cdomain.cer\
\r\n /file remove $_cdomain.key\
\r\n delay 2\
DEPLOY_SCRIPT_CMD="/system script add name=\"LE Cert Deploy - $_cdomain\" owner=admin policy=ftp,read,write,password,sensitive
source=\"## generated by routeros deploy script in acme.sh\r\n
\r\n /certificate remove [ find name=$_cdomain.cer_0 ]
\r\n /certificate remove [ find name=$_cdomain.cer_1 ]
\r\n delay 1
\r\n /certificate import file-name=$_cdomain.cer passphrase=\\\"\\\"
\r\n /certificate import file-name=$_cdomain.key passphrase=\\\"\\\"
\r\n delay 1
\r\n /file remove $_cdomain.cer
\r\n /file remove $_cdomain.key
\r\n delay 2
$router_os_services\""

# shellcheck disable=SC2029
ssh "$Le_router_os_username@$Le_router_os_host" "$DEPLOY_SCRIPT_CMD"
ssh "$Le_router_os_username@$Le_router_os_host" $DEPLOY_SCRIPT_CMD
# shellcheck disable=SC2029
ssh "$Le_router_os_username@$Le_router_os_host" "/system script run \"LE Cert Deploy - $_cdomain\""
# shellcheck disable=SC2029
Expand Down

0 comments on commit ff2ce93

Please sign in to comment.