use avahi for the default domain name on onion only installs

This commit is contained in:
Bob Mottram 2015-12-31 12:00:55 +00:00
parent ef1a0100ab
commit d074b0c3b9
4 changed files with 15 additions and 2 deletions

View File

@ -1239,7 +1239,7 @@ function set_default_onion_domains {
WIKI_DOMAIN_NAME='wiki.onion'
fi
if [ $DEFAULT_DOMAIN_NAME ]; then
DEFAULT_DOMAIN_NAME="${PROJECT_NAME}.onion"
DEFAULT_DOMAIN_NAME="${PROJECT_NAME}.local"
fi
}

View File

@ -84,6 +84,9 @@ MINIMAL_INSTALL="yes"
# default SSH port
SSH_PORT=2222
# Whether sites are accessible only within a Tor browser
ONION_ONLY="no"
mesh_router_setup_script() {
# create a setup script for a mesh router
mesh_script_filename=$1
@ -188,6 +191,10 @@ case $key in
shift
VARIANT="$1"
;;
-o|--onion)
shift
ONION_ONLY="$1"
;;
*)
# unknown option
;;
@ -262,7 +269,8 @@ make $IMAGE_TYPE \
SSH_PUBKEY="$SSH_PUBKEY" \
GENERIC_IMAGE="$GENERIC_IMAGE" \
MINIMAL_INSTALL="$MINIMAL_INSTALL" \
SSH_PORT="$SSH_PORT"
SSH_PORT="$SSH_PORT" \
ONION_ONLY="$ONION_ONLY"
if [ ! "$?" = "0" ]; then
echo $'Build failed'

View File

@ -65,6 +65,9 @@ GENERIC_IMAGE="no"
# default SSH port
SSH_PORT=2222
# Whether sites are accessible only within a Tor browser
ONION_ONLY="no"
enable_eatmydata_override() {
chroot $rootdir apt-get install --no-install-recommends -y eatmydata
if [ -x $rootdir/usr/bin/eatmydata ] && \

View File

@ -53,6 +53,7 @@ export SSH_PUBKEY
export GENERIC_IMAGE
export MINIMAL_INSTALL
export SSH_PORT
export ONION_ONLY
# Locate vmdebootstrap program fetched in Makefile
basedir=`pwd`
@ -166,6 +167,7 @@ sudo sed -i "s|SSH_PUBKEY=.*|SSH_PUBKEY=${SSH_PUBKEY}|g" $TEMP_CUSTOMISE
sudo sed -i "s|GENERIC_IMAGE=.*|GENERIC_IMAGE=${GENERIC_IMAGE}|g" $TEMP_CUSTOMISE
sudo sed -i "s|MINIMAL_INSTALL=.*|MINIMAL_INSTALL=\"${MINIMAL_INSTALL}\"|g" $TEMP_CUSTOMISE
sudo sed -i "s|SSH_PORT=.*|SSH_PORT=\"${SSH_PORT}\"|g" $TEMP_CUSTOMISE
sudo sed -i "s|ONION_ONLY=.*|ONION_ONLY=\"${ONION_ONLY}\"|g" $TEMP_CUSTOMISE
echo $"starting $VMDEBOOTSTRAP"
# Run vmdebootstrap script to create image