Group into apps

This commit is contained in:
Bob Mottram 2016-10-03 14:59:52 +01:00
parent 97c900ab28
commit cc2e08b5c0
1 changed files with 178 additions and 421 deletions

View File

@ -60,431 +60,188 @@ function read_configuration {
if [[ $CONFIGURATION_FILE != "/root/${PROJECT_NAME}.cfg" ]]; then
cp $CONFIGURATION_FILE /root/${PROJECT_NAME}.cfg
fi
if grep -q "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE; then
FRIENDS_MIRRORS_SERVER=$(grep "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE; then
FRIENDS_MIRRORS_SSH_PORT=$(grep "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE; then
FRIENDS_MIRRORS_PASSWORD=$(grep "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MY_MIRRORS_PASSWORD" $CONFIGURATION_FILE; then
MY_MIRRORS_PASSWORD=$(grep "MY_MIRRORS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "REFRESH_GPG_KEYS_HOURS" $CONFIGURATION_FILE; then
REFRESH_GPG_KEYS_HOURS=$(grep "REFRESH_GPG_KEYS_HOURS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WEBMAIL_REPO" $CONFIGURATION_FILE; then
WEBMAIL_REPO=$(grep "WEBMAIL_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WEBMAIL_COMMIT" $CONFIGURATION_FILE; then
WEBMAIL_COMMIT=$(grep "WEBMAIL_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WIFI_INTERFACE" $CONFIGURATION_FILE; then
WIFI_INTERFACE=$(grep "WIFI_INTERFACE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WIFI_SSID" $CONFIGURATION_FILE; then
WIFI_SSID=$(grep "WIFI_SSID" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WIFI_TYPE" $CONFIGURATION_FILE; then
WIFI_TYPE=$(grep "WIFI_TYPE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WIFI_PASSPHRASE" $CONFIGURATION_FILE; then
WIFI_PASSPHRASE=$(grep "WIFI_PASSPHRASE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WIFI_HOTSPOT" $CONFIGURATION_FILE; then
WIFI_HOTSPOT=$(grep "WIFI_HOTSPOT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WIFI_NETWORKS_FILE" $CONFIGURATION_FILE; then
WIFI_NETWORKS_FILE=$(grep "WIFI_NETWORKS_FILE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SYNCTHING_ID" $CONFIGURATION_FILE; then
SYNCTHING_ID=$(grep "SYNCTHING_ID" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SYNCTHING_CONFIG_PATH" $CONFIGURATION_FILE; then
SYNCTHING_CONFIG_PATH=$(grep "SYNCTHING_CONFIG_PATH" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SYNCTHING_CONFIG_FILE" $CONFIGURATION_FILE; then
SYNCTHING_CONFIG_FILE=$(grep "SYNCTHING_CONFIG_FILE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SYNCTHING_RELAY_SERVER" $CONFIGURATION_FILE; then
SYNCTHING_RELAY_SERVER=$(grep "SYNCTHING_RELAY_SERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SYNCTHING_RELEASES" $CONFIGURATION_FILE; then
SYNCTHING_RELEASES=$(grep "SYNCTHING_RELEASES" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SYNCTHING_PORT" $CONFIGURATION_FILE; then
SYNCTHING_PORT=$(grep "SYNCTHING_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SYNCTHING_SHARED_DATA" $CONFIGURATION_FILE; then
SYNCTHING_SHARED_DATA=$(grep "SYNCTHING_SHARED_DATA" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TURN_PORT" $CONFIGURATION_FILE; then
TURN_PORT=$(grep "TURN_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TURN_TLS_PORT" $CONFIGURATION_FILE; then
TURN_TLS_PORT=$(grep "TURN_TLS_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TURN_NONCE" $CONFIGURATION_FILE; then
TURN_NONCE=$(grep "TURN_NONCE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "DEFAULT_SEARCH" $CONFIGURATION_FILE; then
DEFAULT_SEARCH=$(grep "DEFAULT_SEARCH" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SEARCH_ENGINE_PASSWORD" $CONFIGURATION_FILE; then
SEARCH_ENGINE_PASSWORD=$(grep "SEARCH_ENGINE_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "XMPP_PASSWORD" $CONFIGURATION_FILE; then
XMPP_PASSWORD=$(grep "XMPP_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "RSS_READER_REPO" $CONFIGURATION_FILE; then
RSS_READER_REPO=$(grep "RSS_READER_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "RSS_MOBILE_READER_REPO" $CONFIGURATION_FILE; then
RSS_MOBILE_READER_REPO=$(grep "RSS_MOBILE_READER_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "RSS_READER_COMMIT" $CONFIGURATION_FILE; then
RSS_READER_COMMIT=$(grep "RSS_READER_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "RSS_MOBILE_READER_COMMIT" $CONFIGURATION_FILE; then
RSS_MOBILE_READER_COMMIT=$(grep "RSS_MOBILE_READER_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "RSS_READER_ADMIN_PASSWORD" $CONFIGURATION_FILE; then
RSS_READER_ADMIN_PASSWORD=$(grep "RSS_READER_ADMIN_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "RSS_READER_DOMAIN_NAME" $CONFIGURATION_FILE; then
RSS_READER_DOMAIN_NAME=$(grep "RSS_READER_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "PROJECT_WEBSITE" $CONFIGURATION_FILE; then
PROJECT_WEBSITE=$(grep "PROJECT_WEBSITE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "PROJECT_REPO" $CONFIGURATION_FILE; then
PROJECT_REPO=$(grep "PROJECT_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ONION_ONLY" $CONFIGURATION_FILE; then
ONION_ONLY=$(grep "ONION_ONLY" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "IRC_PASSWORD" $CONFIGURATION_FILE; then
IRC_PASSWORD=$(grep "IRC_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "DEFAULT_LANGUAGE" $CONFIGURATION_FILE; then
DEFAULT_LANGUAGE=$(grep "DEFAULT_LANGUAGE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MINIMAL_INSTALL" $CONFIGURATION_FILE; then
MINIMAL_INSTALL=$(grep "MINIMAL_INSTALL" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "LETSENCRYPT_SERVER" $CONFIGURATION_FILE; then
LETSENCRYPT_SERVER=$(grep "LETSENCRYPT_SERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "FULLBLOG_REPO" $CONFIGURATION_FILE; then
FULLBLOG_REPO=$(grep "FULLBLOG_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "FULLBLOG_COMMIT" $CONFIGURATION_FILE; then
FULLBLOG_COMMIT=$(grep "FULLBLOG_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GOGS_COMMIT" $CONFIGURATION_FILE; then
GOGS_COMMIT=$(grep "GOGS_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TOXCORE_COMMIT" $CONFIGURATION_FILE; then
TOXCORE_COMMIT=$(grep "TOXCORE_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TOXIC_COMMIT" $CONFIGURATION_FILE; then
TOXIC_COMMIT=$(grep "TOXIC_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GPGIT_REPO" $CONFIGURATION_FILE; then
GPGIT_REPO=$(grep "GPGIT_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GPGIT_COMMIT" $CONFIGURATION_FILE; then
GPGIT_COMMIT=$(grep "GPGIT_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "HUBZILLA_REPO" $CONFIGURATION_FILE; then
HUBZILLA_REPO=$(grep "HUBZILLA_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "HUBZILLA_COMMIT" $CONFIGURATION_FILE; then
HUBZILLA_COMMIT=$(grep "HUBZILLA_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "IPFS_COMMIT" $CONFIGURATION_FILE; then
IPFS_COMMIT=$(grep "IPFS_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ZERONET_BLOG_COMMIT" $CONFIGURATION_FILE; then
ZERONET_BLOG_COMMIT=$(grep "ZERONET_BLOG_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ZERONET_MAIL_COMMIT" $CONFIGURATION_FILE; then
ZERONET_MAIL_COMMIT=$(grep "ZERONET_MAIL_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ZERONET_FORUM_COMMIT" $CONFIGURATION_FILE; then
ZERONET_FORUM_COMMIT=$(grep "ZERONET_FORUM_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "NGINX_ENSITE_REPO" $CONFIGURATION_FILE; then
NGINX_ENSITE_REPO=$(grep "NGINX_ENSITE_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "NGINX_ENSITE_COMMIT" $CONFIGURATION_FILE; then
NGINX_ENSITE_COMMIT=$(grep "NGINX_ENSITE_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "CLEANUP_MAILDIR_COMMIT" $CONFIGURATION_FILE; then
CLEANUP_MAILDIR_COMMIT=$(grep "CLEANUP_MAILDIR_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "CLEANUP_MAILDIR_REPO" $CONFIGURATION_FILE; then
CLEANUP_MAILDIR_REPO=$(grep "CLEANUP_MAILDIR_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ZERONET_COMMIT" $CONFIGURATION_FILE; then
ZERONET_COMMIT=$(grep "ZERONET_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "INADYN_REPO" $CONFIGURATION_FILE; then
INADYN_REPO=$(grep "INADYN_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "INADYN_COMMIT" $CONFIGURATION_FILE; then
INADYN_COMMIT=$(grep "INADYN_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GPG_KEYSERVER" $CONFIGURATION_FILE; then
GPG_KEYSERVER=$(grep "GPG_KEYSERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "IPFS_PORT" $CONFIGURATION_FILE; then
IPFS_PORT=$(grep "IPFS_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TRACKER_PORT" $CONFIGURATION_FILE; then
TRACKER_PORT=$(grep "TRACKER_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ZERONET_PORT" $CONFIGURATION_FILE; then
ZERONET_PORT=$(grep "ZERONET_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "DH_KEYLENGTH" $CONFIGURATION_FILE; then
DH_KEYLENGTH=$(grep "DH_KEYLENGTH" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "IRC_PORT" $CONFIGURATION_FILE; then
IRC_PORT=$(grep "IRC_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WIFI_CHANNEL" $CONFIGURATION_FILE; then
WIFI_CHANNEL=$(grep "WIFI_CHANNEL" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "BATMAN_CELLID" $CONFIGURATION_FILE; then
BATMAN_CELLID=$(grep "BATMAN_CELLID" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TOX_PORT" $CONFIGURATION_FILE; then
TOX_PORT=$(grep "TOX_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TOX_NODES" $CONFIGURATION_FILE; then
TOX_NODES=$(grep "TOX_NODES" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TOXCORE_REPO" $CONFIGURATION_FILE; then
TOXCORE_REPO=$(grep "TOXCORE_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ENABLE_SOCIAL_KEY_MANAGEMENT" $CONFIGURATION_FILE; then
ENABLE_SOCIAL_KEY_MANAGEMENT=$(grep "ENABLE_SOCIAL_KEY_MANAGEMENT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "IPV6_NETWORK" $CONFIGURATION_FILE; then
IPV6_NETWORK=$(grep "IPV6_NETWORK" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "HWRNG_TYPE" $CONFIGURATION_FILE; then
HWRNG_TYPE=$(grep "HWRNG_TYPE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE; then
MEDIAGOBLIN_DOMAIN_NAME=$(grep "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE; then
MEDIAGOBLIN_CODE=$(grep "MEDIAGOBLIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MEDIAGOBLIN_REPO" $CONFIGURATION_FILE; then
MEDIAGOBLIN_REPO=$(grep "MEDIAGOBLIN_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MEDIAGOBLIN_COMMIT" $CONFIGURATION_FILE; then
MEDIAGOBLIN_COMMIT=$(grep "MEDIAGOBLIN_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GIT_ADMIN_PASSWORD" $CONFIGURATION_FILE; then
GIT_ADMIN_PASSWORD=$(grep "GIT_ADMIN_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GIT_DOMAIN_NAME" $CONFIGURATION_FILE; then
GIT_DOMAIN_NAME=$(grep "GIT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GIT_CODE" $CONFIGURATION_FILE; then
GIT_CODE=$(grep "GIT_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SYSTEM_TYPE" $CONFIGURATION_FILE; then
SYSTEM_TYPE=$(grep "SYSTEM_TYPE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SSL_PROTOCOLS" $CONFIGURATION_FILE; then
SSL_PROTOCOLS=$(grep "SSL_PROTOCOLS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SSL_CIPHERS" $CONFIGURATION_FILE; then
SSL_CIPHERS=$(grep "SSL_CIPHERS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SSH_CIPHERS" $CONFIGURATION_FILE; then
SSH_CIPHERS=$(grep "SSH_CIPHERS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SSH_MACS" $CONFIGURATION_FILE; then
SSH_MACS=$(grep "SSH_MACS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SSH_KEX" $CONFIGURATION_FILE; then
SSH_KEX=$(grep "SSH_KEX" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SSH_HOST_KEY_ALGORITHMS" $CONFIGURATION_FILE; then
SSH_HOST_KEY_ALGORITHMS=$(grep "SSH_HOST_KEY_ALGORITHMS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SSH_PASSWORDS" $CONFIGURATION_FILE; then
SSH_PASSWORDS=$(grep "SSH_PASSWORDS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "XMPP_CIPHERS" $CONFIGURATION_FILE; then
XMPP_CIPHERS=$(grep "XMPP_CIPHERS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "XMPP_ECC_CURVE" $CONFIGURATION_FILE; then
XMPP_ECC_CURVE=$(grep "XMPP_ECC_CURVE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MY_USERNAME" $CONFIGURATION_FILE; then
MY_USERNAME=$(grep "MY_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "DOMAIN_NAME" $CONFIGURATION_FILE; then
# for backwards compatability
DEFAULT_DOMAIN_NAME=$(grep "DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE; then
DEFAULT_DOMAIN_NAME=$(grep "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "DEFAULT_DOMAIN_CODE" $CONFIGURATION_FILE; then
DEFAULT_DOMAIN_CODE=$(grep "DEFAULT_DOMAIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "NAMESERVER1" $CONFIGURATION_FILE; then
NAMESERVER1=$(grep "NAMESERVER1" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "NAMESERVER2" $CONFIGURATION_FILE; then
NAMESERVER2=$(grep "NAMESERVER2" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
read_config_param "FRIENDS_MIRRORS_SERVER"
read_config_param "FRIENDS_MIRRORS_SSH_PORT"
read_config_param "FRIENDS_MIRRORS_PASSWORD"
read_config_param "MY_MIRRORS_PASSWORD"
read_config_param "SYSTEM_TYPE"
read_config_param "SSL_PROTOCOLS"
read_config_param "SSL_CIPHERS"
read_config_param "SSH_CIPHERS"
read_config_param "SSH_MACS"
read_config_param "SSH_KEX"
read_config_param "SSH_HOST_KEY_ALGORITHMS"
read_config_param "SSH_PASSWORDS"
read_config_param "REFRESH_GPG_KEYS_HOURS"
read_config_param "GPG_KEYSERVER"
read_config_param "ENABLE_SOCIAL_KEY_MANAGEMENT"
read_config_param "MY_USERNAME"
read_config_param "DOMAIN_NAME"
read_config_param "DEFAULT_DOMAIN_NAME"
read_config_param "DEFAULT_DOMAIN_CODE"
read_config_param "NAMESERVER1"
read_config_param "NAMESERVER2"
read_config_param "GET_IP_ADDRESS_URL"
read_config_param "DDNS_PROVIDER"
read_config_param "DDNS_USERNAME"
read_config_param "DDNS_PASSWORD"
read_config_param "LOCAL_NETWORK_STATIC_IP_ADDRESS"
read_config_param "ROUTER_IP_ADDRESS"
read_config_param "CPU_CORES"
read_config_param "WEBSERVER_LOG_LEVEL"
read_config_param "ROUTE_THROUGH_TOR"
read_config_param "MY_NAME"
read_config_param "MY_EMAIL_ADDRESS"
read_config_param "INSTALLING_ON_BBB"
read_config_param "SSH_PORT"
read_config_param "INSTALLED_WITHIN_DOCKER"
read_config_param "GPG_ENCRYPT_STORED_EMAIL"
read_config_param "MY_GPG_PUBLIC_KEY"
read_config_param "MY_GPG_PRIVATE_KEY"
read_config_param "MY_GPG_PUBLIC_KEY_ID"
read_config_param "USB_DRIVE"
read_config_param "MAX_PHP_MEMORY"
read_config_param "TLS_TIME_SOURCE1"
read_config_param "TLS_TIME_SOURCE2"
read_config_param "WEBMAIL_REPO"
read_config_param "WEBMAIL_COMMIT"
read_config_param "WIFI_INTERFACE"
read_config_param "WIFI_SSID"
read_config_param "WIFI_TYPE"
read_config_param "WIFI_PASSPHRASE"
read_config_param "WIFI_HOTSPOT"
read_config_param "WIFI_NETWORKS_FILE"
read_config_param "SYNCTHING_ID"
read_config_param "SYNCTHING_CONFIG_PATH"
read_config_param "SYNCTHING_CONFIG_FILE"
read_config_param "SYNCTHING_RELAY_SERVER"
read_config_param "SYNCTHING_RELEASES"
read_config_param "SYNCTHING_PORT"
read_config_param "SYNCTHING_SHARED_DATA"
read_config_param "TURN_PORT"
read_config_param "TURN_TLS_PORT"
read_config_param "TURN_NONCE"
read_config_param "DEFAULT_SEARCH"
read_config_param "SEARCH_ENGINE_PASSWORD"
read_config_param "XMPP_PASSWORD"
read_config_param "RSS_READER_REPO"
read_config_param "RSS_MOBILE_READER_REPO"
read_config_param "RSS_READER_COMMIT"
read_config_param "RSS_MOBILE_READER_COMMIT"
read_config_param "RSS_READER_ADMIN_PASSWORD"
read_config_param "RSS_READER_DOMAIN_NAME"
read_config_param "PROJECT_WEBSITE"
read_config_param "PROJECT_REPO"
read_config_param "ONION_ONLY"
read_config_param "DEFAULT_LANGUAGE"
read_config_param "MINIMAL_INSTALL"
read_config_param "LETSENCRYPT_SERVER"
read_config_param "FULLBLOG_REPO"
read_config_param "FULLBLOG_COMMIT"
read_config_param "IRC_PORT"
read_config_param "IRC_PASSWORD"
read_config_param "GOGS_COMMIT"
read_config_param "GIT_ADMIN_PASSWORD"
read_config_param "GIT_DOMAIN_NAME"
read_config_param "GIT_CODE"
read_config_param "TOXCORE_COMMIT"
read_config_param "TOXIC_COMMIT"
read_config_param "GPGIT_REPO"
read_config_param "GPGIT_COMMIT"
read_config_param "HUBZILLA_REPO"
read_config_param "HUBZILLA_COMMIT"
read_config_param "HUBZILLA_DOMAIN_NAME"
read_config_param "HUBZILLA_CODE"
read_config_param "IPFS_COMMIT"
read_config_param "ZERONET_BLOG_COMMIT"
read_config_param "ZERONET_MAIL_COMMIT"
read_config_param "ZERONET_FORUM_COMMIT"
read_config_param "TRACKER_PORT"
read_config_param "ZERONET_PORT"
read_config_param "NGINX_ENSITE_REPO"
read_config_param "NGINX_ENSITE_REPO"
read_config_param "NGINX_ENSITE_COMMIT"
read_config_param "CLEANUP_MAILDIR_COMMIT"
read_config_param "CLEANUP_MAILDIR_REPO"
read_config_param "ZERONET_COMMIT"
read_config_param "INADYN_REPO"
read_config_param "INADYN_COMMIT"
read_config_param "IPFS_PORT"
read_config_param "DH_KEYLENGTH"
read_config_param "WIFI_CHANNEL"
read_config_param "BATMAN_CELLID"
read_config_param "TOX_PORT"
read_config_param "TOX_NODES"
read_config_param "TOXCORE_REPO"
read_config_param "IPV6_NETWORK"
read_config_param "HWRNG_TYPE"
read_config_param "MEDIAGOBLIN_DOMAIN_NAME"
read_config_param "MEDIAGOBLIN_CODE"
read_config_param "MEDIAGOBLIN_REPO"
read_config_param "MEDIAGOBLIN_COMMIT"
read_config_param "XMPP_CIPHERS"
read_config_param "XMPP_ECC_CURVE"
read_config_param "MUMBLE_PORT"
read_config_param "MUMBLE_SERVER_PASSWORD"
read_config_param "SIP_PORT"
read_config_param "SIP_TLS_PORT"
read_config_param "SIP_SERVER_PASSWORD"
read_config_param "ENABLE_BABEL"
read_config_param "ENABLE_BATMAN"
read_config_param "ENABLE_CJDNS"
read_config_param "CJDNS_COMMIT"
read_config_param "CJDNS_IPV6"
read_config_param "CJDNS_PUBLIC_KEY"
read_config_param "CJDNS_PRIVATE_KEY"
read_config_param "WIKI_TITLE"
read_config_param "WIKI_DOMAIN_NAME"
read_config_param "WIKI_CODE"
read_config_param "PUBLIC_MAILING_LIST"
read_config_param "FULLBLOG_DOMAIN_NAME"
read_config_param "FULLBLOG_CODE"
read_config_param "MY_BLOG_TITLE"
read_config_param "MY_BLOG_SUBTITLE"
if grep -q "DEBIAN_REPO" $CONFIGURATION_FILE; then
DEBIAN_REPO=$(grep "DEBIAN_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
CHECK_MESSAGE=$"Check your internet connection, /etc/network/interfaces and /etc/resolv.conf, then delete $COMPLETION_FILE, run 'rm -fR /var/lib/apt/lists/* && apt-get update --fix-missing' and run this script again. If hash sum mismatches persist then try setting $DEBIAN_REPO to a different mirror and also change /etc/apt/sources.list."
fi
if grep -q "MUMBLE_PORT" $CONFIGURATION_FILE; then
MUMBLE_PORT=$(grep "MUMBLE_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MUMBLE_SERVER_PASSWORD" $CONFIGURATION_FILE; then
MUMBLE_SERVER_PASSWORD=$(grep "MUMBLE_SERVER_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SIP_PORT" $CONFIGURATION_FILE; then
SIP_PORT=$(grep "SIP_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SIP_TLS_PORT" $CONFIGURATION_FILE; then
SIP_TLS_PORT=$(grep "SIP_TLS_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SIP_SERVER_PASSWORD" $CONFIGURATION_FILE; then
SIP_SERVER_PASSWORD=$(grep "SIP_SERVER_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GET_IP_ADDRESS_URL" $CONFIGURATION_FILE; then
GET_IP_ADDRESS_URL=$(grep "GET_IP_ADDRESS_URL" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "DDNS_PROVIDER" $CONFIGURATION_FILE; then
DDNS_PROVIDER=$(grep "DDNS_PROVIDER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "DDNS_USERNAME" $CONFIGURATION_FILE; then
DDNS_USERNAME=$(grep "DDNS_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "DDNS_PASSWORD" $CONFIGURATION_FILE; then
DDNS_PASSWORD=$(grep "DDNS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "LOCAL_NETWORK_STATIC_IP_ADDRESS" $CONFIGURATION_FILE; then
LOCAL_NETWORK_STATIC_IP_ADDRESS=$(grep "LOCAL_NETWORK_STATIC_IP_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ENABLE_BABEL" $CONFIGURATION_FILE; then
ENABLE_BABEL=$(grep "ENABLE_BABEL" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ENABLE_BATMAN" $CONFIGURATION_FILE; then
ENABLE_BATMAN=$(grep "ENABLE_BATMAN" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ENABLE_CJDNS" $CONFIGURATION_FILE; then
ENABLE_CJDNS=$(grep "ENABLE_CJDNS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "CJDNS_COMMIT" $CONFIGURATION_FILE; then
CJDNS_COMMIT=$(grep "CJDNS_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "CJDNS_IPV6" $CONFIGURATION_FILE; then
CJDNS_IPV6=$(grep "CJDNS_IPV6" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "CJDNS_PUBLIC_KEY" $CONFIGURATION_FILE; then
CJDNS_PUBLIC_KEY=$(grep "CJDNS_PUBLIC_KEY" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "CJDNS_PRIVATE_KEY" $CONFIGURATION_FILE; then
CJDNS_PRIVATE_KEY=$(grep "CJDNS_PRIVATE_KEY" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE; then
ROUTER_IP_ADDRESS=$(grep "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "CPU_CORES" $CONFIGURATION_FILE; then
CPU_CORES=$(grep "CPU_CORES" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WEBSERVER_LOG_LEVEL" $CONFIGURATION_FILE; then
WEBSERVER_LOG_LEVEL=$(grep "WEBSERVER_LOG_LEVEL" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "ROUTE_THROUGH_TOR" $CONFIGURATION_FILE; then
ROUTE_THROUGH_TOR=$(grep "ROUTE_THROUGH_TOR" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WIKI_TITLE" $CONFIGURATION_FILE; then
WIKI_TITLE=$(grep "WIKI_TITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MY_NAME" $CONFIGURATION_FILE; then
MY_NAME=$(grep "MY_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MY_EMAIL_ADDRESS" $CONFIGURATION_FILE; then
MY_EMAIL_ADDRESS=$(grep "MY_EMAIL_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "INSTALLING_ON_BBB" $CONFIGURATION_FILE; then
INSTALLING_ON_BBB=$(grep "INSTALLING_ON_BBB" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "SSH_PORT" $CONFIGURATION_FILE; then
SSH_PORT=$(grep "SSH_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "INSTALLED_WITHIN_DOCKER" $CONFIGURATION_FILE; then
INSTALLED_WITHIN_DOCKER=$(grep "INSTALLED_WITHIN_DOCKER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "PUBLIC_MAILING_LIST" $CONFIGURATION_FILE; then
PUBLIC_MAILING_LIST=$(grep "PUBLIC_MAILING_LIST" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "HUBZILLA_DOMAIN_NAME" $CONFIGURATION_FILE; then
HUBZILLA_DOMAIN_NAME=$(grep "HUBZILLA_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "HUBZILLA_CODE" $CONFIGURATION_FILE; then
HUBZILLA_CODE=$(grep "HUBZILLA_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE; then
WIKI_DOMAIN_NAME=$(grep "WIKI_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "WIKI_CODE" $CONFIGURATION_FILE; then
WIKI_CODE=$(grep "WIKI_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
FULLBLOG_DOMAIN_NAME=$(grep "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "FULLBLOG_CODE" $CONFIGURATION_FILE; then
FULLBLOG_CODE=$(grep "FULLBLOG_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MY_BLOG_TITLE" $CONFIGURATION_FILE; then
MY_BLOG_TITLE=$(grep "MY_BLOG_TITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MY_BLOG_SUBTITLE" $CONFIGURATION_FILE; then
MY_BLOG_SUBTITLE=$(grep "MY_BLOG_SUBTITLE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GPG_ENCRYPT_STORED_EMAIL" $CONFIGURATION_FILE; then
GPG_ENCRYPT_STORED_EMAIL=$(grep "GPG_ENCRYPT_STORED_EMAIL" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MY_GPG_PUBLIC_KEY" $CONFIGURATION_FILE; then
MY_GPG_PUBLIC_KEY=$(grep "MY_GPG_PUBLIC_KEY" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MY_GPG_PRIVATE_KEY" $CONFIGURATION_FILE; then
MY_GPG_PRIVATE_KEY=$(grep "MY_GPG_PRIVATE_KEY" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MY_GPG_PUBLIC_KEY_ID" $CONFIGURATION_FILE; then
MY_GPG_PUBLIC_KEY_ID=$(grep "MY_GPG_PUBLIC_KEY_ID" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "USB_DRIVE" $CONFIGURATION_FILE; then
USB_DRIVE=$(grep "USB_DRIVE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "MAX_PHP_MEMORY" $CONFIGURATION_FILE; then
MAX_PHP_MEMORY=$(grep "MAX_PHP_MEMORY" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TLS_TIME_SOURCE1" $CONFIGURATION_FILE; then
TLS_TIME_SOURCE1=$(grep "TLS_TIME_SOURCE1" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "TLS_TIME_SOURCE2" $CONFIGURATION_FILE; then
TLS_TIME_SOURCE2=$(grep "TLS_TIME_SOURCE2" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
fi
echo "System type: $SYSTEM_TYPE"
}