From f1d130a3d88ca57520c7a306d4963c2bcb23081f Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Tue, 21 May 2024 10:45:59 -0700 Subject: [PATCH] fix up dryrun --- sbin/bashup-restore-files.sh | 2 +- sbin/bashup-restore-mysql.sh | 5 ++++- sbin/bashup-restore-pdns.sh | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sbin/bashup-restore-files.sh b/sbin/bashup-restore-files.sh index 98f1413..8022896 100755 --- a/sbin/bashup-restore-files.sh +++ b/sbin/bashup-restore-files.sh @@ -38,7 +38,7 @@ while getopts "b:np:h" opt; do backup=${OPTARG} ;; n ) - dryrun=${OPTARG} + dryrun=true ;; p ) pathtorestore=${OPTARG} diff --git a/sbin/bashup-restore-mysql.sh b/sbin/bashup-restore-mysql.sh index e60c4b2..f259eca 100755 --- a/sbin/bashup-restore-mysql.sh +++ b/sbin/bashup-restore-mysql.sh @@ -29,7 +29,7 @@ help() } # set any options that were passed -while getopts "b:d:h" opt; do +while getopts "b:d:nh" opt; do case "${opt}" in h ) help @@ -40,6 +40,9 @@ while getopts "b:d:h" opt; do d ) database=${OPTARG} ;; + n ) + dryrun=${OPTARG} + ;; \? ) echo "Invalid option: $OPTARG" 1>&2 exit 1;; diff --git a/sbin/bashup-restore-pdns.sh b/sbin/bashup-restore-pdns.sh index ee22994..4d93855 100755 --- a/sbin/bashup-restore-pdns.sh +++ b/sbin/bashup-restore-pdns.sh @@ -29,7 +29,7 @@ help() } # set any options that were passed -while getopts "b:z:h" opt; do +while getopts "b:nz:h" opt; do case "${opt}" in h ) help @@ -37,6 +37,9 @@ while getopts "b:z:h" opt; do b ) backup=${OPTARG} ;; + n ) + dryrun=true + ;; z ) zone=${OPTARG} ;;