Update nodemgmt-scripts.sh
This commit is contained in:
@@ -69,7 +69,19 @@ case "$1" in
|
||||
|
||||
;;
|
||||
newsite)
|
||||
NEW_SITE=${2}
|
||||
while getopts ':site:type:ssl:' flag; do
|
||||
case "${flag}" in
|
||||
site) NEW_SITE=$OPTARG ;;
|
||||
type) SITE_TYPE=$OPTARG ;;
|
||||
ssl) CREATE_SSL=$OPTARG ;;
|
||||
:)
|
||||
echo "Invalid option: '${OPTARG}' requires an argument" 1>&2
|
||||
echo ""
|
||||
echo -e "Usage: ${idsCL[Yellow]}nodemgmt newcert${idsCL[Default]} { ${idsCL[Yellow]}-site${idsCL[Default]} {domain address} | ${idsCL[Yellow]}-type${idsCL[Default]} {'local' or 'proxy'} | ${idsCL[ Yellow]}-ssl${idsCL[Default]} {true or false} | ${idsCL[Yellow]}certrenew${idsCL[Default]} | ${idsCL[ Yellow]}-proxy_scheme${idsCL[Default]} {http or https} | ${idsCL[ Yellow]}-proxy_host${idsCL[Default]} {IP or FQDN} | ${idsCL[ Yellow]}-proxy_port${idsCL[Default]} {host port} }"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo -e "${idsCL[LightGreen]}Setting up new site for '${idsCL[Yellow]}${NEW_SITE}${idsCL[LightGreen]}'...${idsCL[Default]}"
|
||||
echo ""
|
||||
mkdir -p /var/www/${NEW_SITE}/{public_folder,nginx_logs}
|
||||
|
||||
Reference in New Issue
Block a user