freedombone/src/freedombone-vars

112 lines
2.9 KiB
Plaintext
Raw Normal View History

2016-07-05 16:48:36 +02:00
#!/bin/bash
2018-04-08 14:30:21 +02:00
# _____ _ _
# | __|___ ___ ___ _| |___ _____| |_ ___ ___ ___
# | __| _| -_| -_| . | . | | . | . | | -_|
# |__| |_| |___|___|___|___|_|_|_|___|___|_|_|___|
2016-07-05 16:48:36 +02:00
#
2018-04-08 14:30:21 +02:00
# Freedom in the Cloud
2016-07-05 16:48:36 +02:00
#
# Common variables and functions
#
# License
# =======
#
2018-02-21 20:32:13 +01:00
# Copyright (C) 2014-2018 Bob Mottram <bob@freedombone.net>
2016-07-05 16:48:36 +02:00
#
# 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/>.
2018-02-25 12:27:48 +01:00
DEFAULT_LANGUAGE=$LANG
2016-07-05 16:48:36 +02:00
2018-02-25 12:27:48 +01:00
if [ ! "$PROJECT_NAME" ]; then
2016-09-22 19:11:31 +02:00
PROJECT_NAME='freedombone'
fi
2016-07-05 16:48:36 +02:00
PROJECT_INSTALL_DIR=/usr/local/bin
if [ -f /usr/bin/${PROJECT_NAME} ]; then
2016-09-22 19:11:31 +02:00
PROJECT_INSTALL_DIR=/usr/bin
2016-07-05 16:48:36 +02:00
fi
# username created by default within a debian image
GENERIC_IMAGE_USERNAME='fbone'
# Web site
PROJECT_WEBSITE="http://${PROJECT_NAME}.uk.to"
# Repo
2018-06-04 16:11:00 +02:00
PROJECT_REPO="https://code.freedombone.net/bashrc/${PROJECT_NAME}"
2016-07-05 16:48:36 +02:00
# Are we installing on a Beaglebone Black (BBB) or some other system?
INSTALLING_ON_BBB="no"
# Version number of this script
2018-04-14 20:52:42 +02:00
VERSION="3.1"
2016-07-05 16:48:36 +02:00
# 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"
2017-05-29 14:57:39 +02:00
DEBIAN_VERSION="stretch"
2016-07-05 16:48:36 +02:00
# social key management
ENABLE_SOCIAL_KEY_MANAGEMENT="no"
2017-06-16 16:39:48 +02:00
# Whether this is a dedicated gnusocial or postactiv instance
SOCIALINSTANCE=
2016-07-05 16:48:36 +02:00
# include utils
2018-02-25 12:27:48 +01:00
UTILS_FILES="/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*"
2016-07-05 16:48:36 +02:00
for f in $UTILS_FILES
do
2018-02-25 12:27:48 +01:00
source "$f"
2016-07-05 16:48:36 +02:00
done
2016-07-06 10:24:42 +02:00
# include base system apps
2018-02-25 12:27:48 +01:00
BASE_SYSTEM_FILES="/usr/share/${PROJECT_NAME}/base/${PROJECT_NAME}-base-*"
2016-07-06 10:24:42 +02:00
for f in $BASE_SYSTEM_FILES
do
2018-02-25 12:27:48 +01:00
source "$f"
2016-07-06 10:24:42 +02:00
done
2016-07-05 16:48:36 +02:00
#include apps
2018-02-25 12:27:48 +01:00
APP_FILES="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*"
2016-07-06 21:06:57 +02:00
for f in $APP_FILES
2016-07-05 16:48:36 +02:00
do
2018-02-25 12:27:48 +01:00
source "$f"
2016-07-05 16:48:36 +02:00
done
# optionally specify your name to appear on the blog
MY_NAME=$DEFAULT_DOMAIN_NAME
2016-07-05 17:30:36 +02:00
2016-07-12 09:27:11 +02:00
# used to select mesh install functions when creating a mesh image
INSTALLING_MESH=
2017-06-22 12:55:28 +02:00
# The .local avahi name
LOCAL_NAME=${PROJECT_NAME}
2016-07-05 17:30:36 +02:00
# NOTE: deliberately there is no "exit 0"