Skip to content

Commit

Permalink
Add step to run arouteserver html
Browse files Browse the repository at this point in the history
Run arouteserver html if /root/arouteserver_html/ exists. Not tested.
  • Loading branch information
bluikko committed Apr 20, 2021
1 parent e532f1f commit 2fc1a35
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ IP_VER="${IP_VER}"

CLIENTS_FILE_PATH="/root/clients.txt"
OUTPUT_DIR="/root/arouteserver_configs"
OUTPUT_DIR_HTML="/root/arouteserver_html"

if [[ ! -e "${OUTPUT_DIR}" && ! -d "${OUTPUT_DIR}" ]]; then
error "The output directory ${OUTPUT_DIR} can't be found.
Expand Down Expand Up @@ -98,6 +99,26 @@ else
echo ""
fi

if [[ -e "${OUTPUT_DIR_HTML}" && -d "${OUTPUT_DIR_HTML}" ]]; then
OUTPUT_FILE_HTML="${DAEMON}.html"

echo ""
echo "Generating HTML textual representation of route server's options and policies"
echo ""

OUTPUT_PATH_HTML="${OUTPUT_DIR_HTML}/${OUTPUT_FILE_HTML}"

arouteserver \
html \
--clients "${CLIENTS_FILE_PATH}" \
-o "${OUTPUT_PATH_HTML}"

echo ""
bold "Textual representation of route server policy for ${DAEMON} saved to ${OUTPUT_PATH_HTML} (path on the container)."
echo "You will find the textual representation file in your host system, inside the directory that you mounted at run-time."
echo ""
fi

echo ""
bold "Generating route server configuration for ${DAEMON} ${VERSION}..."
echo ""
Expand Down

0 comments on commit 2fc1a35

Please sign in to comment.