Skip to content
Snippets Groups Projects
freedombone-vars 2.83 KiB
Newer Older
#!/bin/bash
Bob Mottram's avatar
Bob Mottram committed
#  _____               _           _
# |   __|___ ___ ___ _| |___ _____| |_ ___ ___ ___
# |   __|  _| -_| -_| . | . |     | . | . |   | -_|
# |__|  |_| |___|___|___|___|_|_|_|___|___|_|_|___|
Bob Mottram's avatar
Bob Mottram committed
#                              Freedom in the Cloud
#
# Common variables and functions
#
# License
# =======
#
Bob Mottram's avatar
Bob Mottram committed
# Copyright (C) 2014-2019 Bob Mottram <bob@freedombone.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

Bob Mottram's avatar
Bob Mottram committed
DEFAULT_LANGUAGE=$LANG
Bob Mottram's avatar
Bob Mottram committed
if [ ! "$PROJECT_NAME" ]; then
Bob Mottram's avatar
Bob Mottram committed
    PROJECT_NAME='freedombone'
fi

PROJECT_INSTALL_DIR=/usr/local/bin
if [ -f /usr/bin/${PROJECT_NAME} ]; then
Bob Mottram's avatar
Bob Mottram committed
    PROJECT_INSTALL_DIR=/usr/bin
fi

# username created by default within a debian image
GENERIC_IMAGE_USERNAME='fbone'

# Web site
Bob Mottram's avatar
Bob Mottram committed
PROJECT_WEBSITE="https://${PROJECT_NAME}.net"
Bob Mottram's avatar
Bob Mottram committed
PROJECT_REPO="https://code.freedombone.net/bashrc/${PROJECT_NAME}"

# Are we installing on a Beaglebone Black (BBB) or some other system?
INSTALLING_ON_BBB="no"

# Version number of this script
Bob Mottram's avatar
Bob Mottram committed
VERSION="3.2"

# if yes then this minimises the number of descisions presented during install
MINIMAL_INSTALL="yes"

# Whether web sites will be .onion addresses only
ONION_ONLY="no"

# whether the system is being installed from a pre-created configuration file
INSTALLING_FROM_CONFIGURATION_FILE="no"

# number of CPU cores
CPU_CORES=1

# whether to route outgoing traffic through Tor
ROUTE_THROUGH_TOR="no"

# Whether this system is being installed within a docker container
INSTALLED_WITHIN_DOCKER="no"

Bob Mottram's avatar
Bob Mottram committed
DEBIAN_VERSION="stretch"

# social key management
ENABLE_SOCIAL_KEY_MANAGEMENT="no"

# include utils
Bob Mottram's avatar
Bob Mottram committed
UTILS_FILES="/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*"
for f in $UTILS_FILES
do
Bob Mottram's avatar
Bob Mottram committed
    source "$f"
# include base system apps
Bob Mottram's avatar
Bob Mottram committed
BASE_SYSTEM_FILES="/usr/share/${PROJECT_NAME}/base/${PROJECT_NAME}-base-*"
for f in $BASE_SYSTEM_FILES
do
Bob Mottram's avatar
Bob Mottram committed
    source "$f"
#include apps
Bob Mottram's avatar
Bob Mottram committed
APP_FILES="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*"
for f in $APP_FILES
Bob Mottram's avatar
Bob Mottram committed
    source "$f"
Bob Mottram's avatar
Bob Mottram committed
source /usr/local/bin/${PROJECT_NAME}-shortcuts
Bob Mottram's avatar
Bob Mottram committed

# optionally specify your name to appear on the blog
MY_NAME=$DEFAULT_DOMAIN_NAME
Bob Mottram's avatar
Bob Mottram committed

# used to select mesh install functions when creating a mesh image
INSTALLING_MESH=

# The .local avahi name
LOCAL_NAME=${PROJECT_NAME}

Bob Mottram's avatar
Bob Mottram committed
# NOTE: deliberately there is no "exit 0"