adds readme and host
This commit is contained in:
13
src/host.sh
Normal file
13
src/host.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# check if we should add to host file
|
||||
if $VDM_UPDATE_HOST; then
|
||||
# check if already in host file
|
||||
if grep -q "${1:-$VDM_SUBDOMAIN}.${2:-$VDM_DOMAIN}" /etc/hosts; then
|
||||
echo "[notice] ${USER^}, ${1:-$VDM_SUBDOMAIN}.${2:-$VDM_DOMAIN} is already in the /etc/hosts file."
|
||||
else
|
||||
# just a notice for now
|
||||
echo "[notice] ${USER^}, you should add ${1:-$VDM_SUBDOMAIN}.${2:-$VDM_DOMAIN} to the /etc/hosts file."
|
||||
# sudo echo "127.0.0.1 ${VDM_SUBDOMAIN}.${VDM_DOMAIN}" >> /etc/hosts
|
||||
fi
|
||||
fi
|
@ -324,13 +324,8 @@ networks:
|
||||
EOF
|
||||
}
|
||||
|
||||
# add to the host file if not already set
|
||||
#if [ $VDM_UPDATE_HOST ]; then
|
||||
# grep -q "${VDM_SUBDOMAIN}.${VDM_DOMAIN}" /etc/hosts || {
|
||||
# echo "[notice] Adding ${VDM_SUBDOMAIN}.${VDM_DOMAIN} to the /etc/hosts file."
|
||||
# sudo echo "127.0.0.1 ${VDM_SUBDOMAIN}.${VDM_DOMAIN}" >> /etc/hosts
|
||||
# }
|
||||
#fi
|
||||
# set host file if needed
|
||||
source "${VDM_SRC_PATH}/host.sh"
|
||||
|
||||
# create the directory if it does not yet already exist
|
||||
# shellcheck disable=SC2174
|
||||
|
@ -99,13 +99,8 @@ networks:
|
||||
EOF
|
||||
}
|
||||
|
||||
# add to the host file if not already set
|
||||
#if [ $VDM_UPDATE_HOST ]; then
|
||||
# grep -q "port.${VDM_DOMAIN}" /etc/hosts || {
|
||||
# echo "[notice] Adding port.${VDM_DOMAIN} to the /etc/hosts file."
|
||||
# sudo -- sh -c "127.0.0.1 port.${VDM_DOMAIN} >> /etc/hosts"
|
||||
# }
|
||||
#fi
|
||||
# set host file if needed
|
||||
source "${VDM_SRC_PATH}/host.sh" "port"
|
||||
|
||||
## create the directory if it does not yet already exist
|
||||
# shellcheck disable=SC2174
|
||||
|
Reference in New Issue
Block a user