MarkdownResume-Pipeline-Cli.../vendor/git.knownelement.com/ExternalVendorCode/mo/demo/important-file
Charles N Wyble 8ff6e0857f Add "mo" from "https://git.knownelement.com/ExternalVendorCode/mo.git@master"
git-vendor-name: mo
git-vendor-dir: vendor/git.knownelement.com/ExternalVendorCode/mo
git-vendor-repository: https://git.knownelement.com/ExternalVendorCode/mo.git
git-vendor-ref: master
2024-12-10 16:10:18 -06:00

29 lines
649 B
Bash
Executable File

#!/usr/bin/env bash
cd "$(dirname "$0")"/..
date-string() {
date
}
wrapper() {
echo -n "*** $(cat) ***"
}
export IP=127.0.0.1
export ALLOWED_HOSTS=( 192.168.0.1 192.168.0.2 192.168.0.3 )
. ./mo # Keep in mind this script is executing in the parent directory
cat <<EOF | mo
# {{#wrapper}}OH SO IMPORTANT{{/wrapper}}
# This file automatically generated at {{date-string}}
home_ip={{IP}}
# ALLOWED HOSTS
{{#ALLOWED_HOSTS}}allowed_host={{.}}
{{/ALLOWED_HOSTS}}{{^ALLOWED_HOSTS}}# No allowed hosts{{/ALLOWED_HOSTS}}
# DENIED HOSTS
{{#DENIED_HOSTS}}denied_host={{.}}
{{/DENIED_HOSTS}}{{^DENIED_HOSTS}}# No denied hosts{{/DENIED_HOSTS}}
EOF