Obtain config values for individual installs
This commit is contained in:
parent
cfcdc14a91
commit
debf1411ad
|
@ -588,6 +588,28 @@ function install_blog_from_repo {
|
|||
}
|
||||
|
||||
function install_blog {
|
||||
if [ ! $ONION_ONLY ]; then
|
||||
ONION_ONLY='no'
|
||||
fi
|
||||
if grep -q "ONION_ONLY" $CONFIGURATION_FILE; then
|
||||
ONION_ONLY=$(grep "ONION_ONLY" $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 "DDNS_PROVIDER" $CONFIGURATION_FILE; then
|
||||
DDNS_PROVIDER=$(grep "DDNS_PROVIDER" $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 [ ! $FULLBLOG_DOMAIN_NAME ]; then
|
||||
echo $'The blog domain name was not specified'
|
||||
exit 5062
|
||||
|
|
|
@ -987,6 +987,29 @@ function install_gnusocial {
|
|||
if [[ $(app_is_installed gnusocial) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! $ONION_ONLY ]; then
|
||||
ONION_ONLY='no'
|
||||
fi
|
||||
if grep -q "ONION_ONLY" $CONFIGURATION_FILE; then
|
||||
ONION_ONLY=$(grep "ONION_ONLY" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
MICROBLOG_DOMAIN_NAME=$(grep "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MICROBLOG_CODE" $CONFIGURATION_FILE; then
|
||||
MICROBLOG_CODE=$(grep "MICROBLOG_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MICROBLOG_WELCOME_MESSAGE" $CONFIGURATION_FILE; then
|
||||
MICROBLOG_WELCOME_MESSAGE=$(grep "MICROBLOG_WELCOME_MESSAGE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "MICROBLOG_BACKGROUND_IMAGE_URL" $CONFIGURATION_FILE; then
|
||||
MICROBLOG_BACKGROUND_IMAGE_URL=$(grep "MICROBLOG_BACKGROUND_IMAGE_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
|
||||
|
||||
install_gnusocial_main
|
||||
expire_gnusocial_posts
|
||||
install_gnusocial_theme
|
||||
|
|
|
@ -422,6 +422,22 @@ function remove_gogs {
|
|||
}
|
||||
|
||||
function install_gogs {
|
||||
if [ ! $ONION_ONLY ]; then
|
||||
ONION_ONLY='no'
|
||||
fi
|
||||
if grep -q "ONION_ONLY" $CONFIGURATION_FILE; then
|
||||
ONION_ONLY=$(grep "ONION_ONLY" $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 "DDNS_PROVIDER" $CONFIGURATION_FILE; then
|
||||
DDNS_PROVIDER=$(grep "DDNS_PROVIDER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
|
||||
if [ ! $GIT_DOMAIN_NAME ]; then
|
||||
return
|
||||
fi
|
||||
|
|
|
@ -376,6 +376,22 @@ function remove_hubzilla {
|
|||
}
|
||||
|
||||
function install_hubzilla {
|
||||
if [ ! $ONION_ONLY ]; then
|
||||
ONION_ONLY='no'
|
||||
fi
|
||||
if grep -q "ONION_ONLY" $CONFIGURATION_FILE; then
|
||||
ONION_ONLY=$(grep "ONION_ONLY" $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 "DDNS_PROVIDER" $CONFIGURATION_FILE; then
|
||||
DDNS_PROVIDER=$(grep "DDNS_PROVIDER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
|
||||
if [ ! $HUBZILLA_DOMAIN_NAME ]; then
|
||||
return
|
||||
fi
|
||||
|
|
|
@ -180,6 +180,22 @@ function remove_mediagoblin {
|
|||
}
|
||||
|
||||
function install_mediagoblin {
|
||||
if [ ! $ONION_ONLY ]; then
|
||||
ONION_ONLY='no'
|
||||
fi
|
||||
if grep -q "ONION_ONLY" $CONFIGURATION_FILE; then
|
||||
ONION_ONLY=$(grep "ONION_ONLY" $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 "DDNS_PROVIDER" $CONFIGURATION_FILE; then
|
||||
DDNS_PROVIDER=$(grep "DDNS_PROVIDER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
|
||||
if [ ! $MEDIAGOBLIN_DOMAIN_NAME ]; then
|
||||
return
|
||||
fi
|
||||
|
|
|
@ -273,6 +273,26 @@ function install_wiki {
|
|||
if [[ $(app_is_installed wiki) == "1" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! $ONION_ONLY ]; then
|
||||
ONION_ONLY='no'
|
||||
fi
|
||||
if grep -q "ONION_ONLY" $CONFIGURATION_FILE; then
|
||||
ONION_ONLY=$(grep "ONION_ONLY" $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 "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 "DDNS_PROVIDER" $CONFIGURATION_FILE; then
|
||||
DDNS_PROVIDER=$(grep "DDNS_PROVIDER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
|
||||
if [ ! $WIKI_DOMAIN_NAME ]; then
|
||||
return
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue