use avahi for the default domain name on onion only installs
This commit is contained in:
parent
ef1a0100ab
commit
d074b0c3b9
|
@ -1239,7 +1239,7 @@ function set_default_onion_domains {
|
||||||
WIKI_DOMAIN_NAME='wiki.onion'
|
WIKI_DOMAIN_NAME='wiki.onion'
|
||||||
fi
|
fi
|
||||||
if [ $DEFAULT_DOMAIN_NAME ]; then
|
if [ $DEFAULT_DOMAIN_NAME ]; then
|
||||||
DEFAULT_DOMAIN_NAME="${PROJECT_NAME}.onion"
|
DEFAULT_DOMAIN_NAME="${PROJECT_NAME}.local"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,9 @@ MINIMAL_INSTALL="yes"
|
||||||
# default SSH port
|
# default SSH port
|
||||||
SSH_PORT=2222
|
SSH_PORT=2222
|
||||||
|
|
||||||
|
# Whether sites are accessible only within a Tor browser
|
||||||
|
ONION_ONLY="no"
|
||||||
|
|
||||||
mesh_router_setup_script() {
|
mesh_router_setup_script() {
|
||||||
# create a setup script for a mesh router
|
# create a setup script for a mesh router
|
||||||
mesh_script_filename=$1
|
mesh_script_filename=$1
|
||||||
|
@ -188,6 +191,10 @@ case $key in
|
||||||
shift
|
shift
|
||||||
VARIANT="$1"
|
VARIANT="$1"
|
||||||
;;
|
;;
|
||||||
|
-o|--onion)
|
||||||
|
shift
|
||||||
|
ONION_ONLY="$1"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# unknown option
|
# unknown option
|
||||||
;;
|
;;
|
||||||
|
@ -262,7 +269,8 @@ make $IMAGE_TYPE \
|
||||||
SSH_PUBKEY="$SSH_PUBKEY" \
|
SSH_PUBKEY="$SSH_PUBKEY" \
|
||||||
GENERIC_IMAGE="$GENERIC_IMAGE" \
|
GENERIC_IMAGE="$GENERIC_IMAGE" \
|
||||||
MINIMAL_INSTALL="$MINIMAL_INSTALL" \
|
MINIMAL_INSTALL="$MINIMAL_INSTALL" \
|
||||||
SSH_PORT="$SSH_PORT"
|
SSH_PORT="$SSH_PORT" \
|
||||||
|
ONION_ONLY="$ONION_ONLY"
|
||||||
|
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
echo $'Build failed'
|
echo $'Build failed'
|
||||||
|
|
|
@ -65,6 +65,9 @@ GENERIC_IMAGE="no"
|
||||||
# default SSH port
|
# default SSH port
|
||||||
SSH_PORT=2222
|
SSH_PORT=2222
|
||||||
|
|
||||||
|
# Whether sites are accessible only within a Tor browser
|
||||||
|
ONION_ONLY="no"
|
||||||
|
|
||||||
enable_eatmydata_override() {
|
enable_eatmydata_override() {
|
||||||
chroot $rootdir apt-get install --no-install-recommends -y eatmydata
|
chroot $rootdir apt-get install --no-install-recommends -y eatmydata
|
||||||
if [ -x $rootdir/usr/bin/eatmydata ] && \
|
if [ -x $rootdir/usr/bin/eatmydata ] && \
|
||||||
|
|
|
@ -53,6 +53,7 @@ export SSH_PUBKEY
|
||||||
export GENERIC_IMAGE
|
export GENERIC_IMAGE
|
||||||
export MINIMAL_INSTALL
|
export MINIMAL_INSTALL
|
||||||
export SSH_PORT
|
export SSH_PORT
|
||||||
|
export ONION_ONLY
|
||||||
|
|
||||||
# Locate vmdebootstrap program fetched in Makefile
|
# Locate vmdebootstrap program fetched in Makefile
|
||||||
basedir=`pwd`
|
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|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|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|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"
|
echo $"starting $VMDEBOOTSTRAP"
|
||||||
# Run vmdebootstrap script to create image
|
# Run vmdebootstrap script to create image
|
||||||
|
|
Loading…
Reference in New Issue