standardize: read user input with [key] instead of <key>, [long input] instead of <INPUT>; echo path with [[path]]

This commit is contained in:
Luk Lu
2023-10-10 10:23:51 +08:00
parent c56fb5202f
commit 5253cac12b
26 changed files with 153 additions and 153 deletions

View File

@@ -9,12 +9,12 @@ echo
while [ ! "$ISSUEMODE" ]
do
echo "=== Issue mode:"
echo " <s> for standalone"
echo " <w> for webroot"
echo " <n> for nginx"
echo " <a> for apache"
echo " <c> for challenge-alias"
echo " <d> for dnsapi"
echo " [s] for standalone"
echo " [w] for webroot"
echo " [n] for nginx"
echo " [a] for apache"
echo " [c] for challenge-alias"
echo " [d] for dnsapi"
read -p ">>> " ISSUEMODE
if [ "$ISSUEMODE" == 's' ]
then
@@ -45,7 +45,7 @@ if [ "$ISSUEMODE" == 'd' ]
then
while [ ! "$DNSAPI" ]
do
echo "=== DNS API provider, <cf> for CloudFlare, <dp> for DNSPod/腾讯云, <ali> for Aliyun/阿里云:"
echo "=== DNS API provider, [cf] for CloudFlare, [dp] for DNSPod/腾讯云, [ali] for Aliyun/阿里云:"
read -p ">>> " DNSAPI_PROVIDER
if [ "$DNSAPI_PROVIDER" == 'cf' ]
then
@@ -76,7 +76,7 @@ echo "***"
~/.acme.sh/acme.sh --issue -d $TARGET_HOSTNAME $ISSUEPARM $DNSAPI
echo
echo "=== Install certificates? <n> for no, <anything else> to install: "
echo "=== Install certificates? [n] for no, [anything else] to install: "
read -p ">>> " INSTALL_CERT
if [ "$INSTALL_CERT" != 'n' ]
then
@@ -93,7 +93,7 @@ then
read -p ">>> " FULLCHAIN_FILE_PATH
done
echo
echo "=== Set reload command, <leave blank> for default to 'service nginx force-reload'"
echo "=== Set reload command, [leave blank] for default to 'service nginx force-reload'"
read -p ">>> " RELOADCMD
if [ ! "$RELOADCMD" ]
then