Skip to content

Commit

Permalink
Try replacing with defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
gthess committed Jan 4, 2023
1 parent ea8be9d commit 188c3c0
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ build:
python: "3"
jobs:
post_build:
#- bash scripts/use_defaults_for_manpages.sh
- echo `pwd`
- echo `ls -al source/_build/html/manpages`
- bash scripts/use_defaults_for_manpages.sh
#- echo `pwd`
#- echo `ls -al source/_build/html/manpages`
30 changes: 30 additions & 0 deletions scripts/use_defaults_for_manpages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# HTML manpages directory in readthedocs
MANPAGES_HTML_DIR=source/_build/html/manpages

# Unbound default values
UNBOUND_RUN_DIR=/usr/local/etc/unbound
UNBOUND_ROOTKEY_FILE=${UNBOUND_RUN_DIR}/root.key
UNBOUND_ROOTCERT_FILE=${UNBOUND_RUN_DIR}/icannbundle.pem
UNBOUND_CHROOT_DIR=${UNBOUND_RUN_DIR}
UNBOUND_PIDFILE=${UNBOUND_RUN_DIR}/unbound.pid
UNBOUND_USERNAME=unbound
ub_conf_file=${UNBOUND_RUN_DIR}/unbound.conf
DNSTAP_SOCKET_PATH=''



for f in ${MANPAGES_HTML_DIR}/*
do
sed -i \
-e 's/@UNBOUND_RUN_DIR\@/'${UNBOUND_RUN_DIR}'/' \
-e 's/@UNBOUND_ROOTKEY_FILE\@/'${UNBOUND_ROOTKEY_FILE}'/' \
-e 's/@UNBOUND_ROOTCERT_FILE\@/'${UNBOUND_ROOTCERT_FILE}'/' \
-e 's/@UNBOUND_CHROOT_DIR\@/'${UNBOUND_CHROOT_DIR}'/' \
-e 's/@UNBOUND_PIDFILE\@/'${UNBOUND_PIDFILE}'/' \
-e 's/@UNBOUND_USERNAME\@/'${UNBOUND_USERNAME}'/' \
-e 's/@ub_conf_file\@/'${ub_conf_file}'/' \
-e 's/@DNSTAP_SOCKET_PATH\@/'${DNSTAP_SOCKET_PATH}'/' \
${f}
done

0 comments on commit 188c3c0

Please sign in to comment.