formatting, variables and intro text
This commit is contained in:
parent
3d6b6e1e1b
commit
bf28658a43
3
.vscode/numbered-bookmarks.json
vendored
Normal file
3
.vscode/numbered-bookmarks.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"bookmarks": []
|
||||||
|
}
|
35
setup.sh
Normal file
35
setup.sh
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#######
|
||||||
|
### Update NGINX configuration '<tags>' with proper values and optionally copy
|
||||||
|
### to updated directory structure
|
||||||
|
#######
|
||||||
|
|
||||||
|
|
||||||
|
# text formatting ansi codes
|
||||||
|
err="\e[1;31m"
|
||||||
|
ok="\e[1;32m"
|
||||||
|
warn="\e[93m"
|
||||||
|
mag="\e[95m"
|
||||||
|
cyan="\e[96m"
|
||||||
|
norm="\e[0m"
|
||||||
|
|
||||||
|
|
||||||
|
# set variables
|
||||||
|
detectedIP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')
|
||||||
|
regexIP4="(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])"
|
||||||
|
|
||||||
|
|
||||||
|
# quick intro for the user
|
||||||
|
echo -e "\n${mag}This script will customize the provided NGINX template files for your"
|
||||||
|
echo "environment. You will be prompted for all necessary information. After that,"
|
||||||
|
echo "default error pages will be copied to your webroot and your NGINX configuration"
|
||||||
|
echo -e "directory structure will be customized.${norm}\n"
|
||||||
|
echo -e "${warn}You may accept the default option (listed in brackets) by simply"
|
||||||
|
echo "pressing ENTER (i.e. no answer)."
|
||||||
|
echo -e "You may exit this script at any prompt by typing 'X'${norm}\n"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user