Better handling of the freedns code
This commit is contained in:
parent
f2248f9503
commit
abd244b1a3
128
src/freedombone
128
src/freedombone
|
@ -684,16 +684,22 @@ function interactive_configuration {
|
||||||
esac
|
esac
|
||||||
WIKI_TITLE=$(cat $data | sed -n 1p)
|
WIKI_TITLE=$(cat $data | sed -n 1p)
|
||||||
WIKI_DOMAIN_NAME=$(cat $data | sed -n 2p)
|
WIKI_DOMAIN_NAME=$(cat $data | sed -n 2p)
|
||||||
done
|
if [ $WIKI_DOMAIN_NAME ]; then
|
||||||
if [ ! $DOMAIN_NAME ]; then
|
if [ ! $DOMAIN_NAME ]; then
|
||||||
DOMAIN_NAME=$WIKI_DOMAIN_NAME
|
DOMAIN_NAME=$WIKI_DOMAIN_NAME
|
||||||
fi
|
fi
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
WIKI_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 3p)
|
WIKI_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 3p)
|
||||||
if [[ $DOMAIN_NAME == "$WIKI_DOMAIN_NAME" ]]; then
|
if [ ! $WIKI_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||||
FREEDNS_SUBDOMAIN_CODE=$WIKI_FREEDNS_SUBDOMAIN_CODE
|
WIKI_DOMAIN_NAME=""
|
||||||
|
else
|
||||||
|
if [[ $DOMAIN_NAME == "$WIKI_DOMAIN_NAME" ]]; then
|
||||||
|
FREEDNS_SUBDOMAIN_CODE=$WIKI_FREEDNS_SUBDOMAIN_CODE
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_FULL" ]]; then
|
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_FULL" ]]; then
|
||||||
|
@ -724,19 +730,25 @@ function interactive_configuration {
|
||||||
esac
|
esac
|
||||||
MY_BLOG_TITLE=$(cat $data | sed -n 1p)
|
MY_BLOG_TITLE=$(cat $data | sed -n 1p)
|
||||||
FULLBLOG_DOMAIN_NAME=$(cat $data | sed -n 2p)
|
FULLBLOG_DOMAIN_NAME=$(cat $data | sed -n 2p)
|
||||||
if [[ $FULLBLOG_DOMAIN_NAME == "$WIKI_DOMAIN_NAME" ]]; then
|
if [ $FULLBLOG_DOMAIN_NAME ]; then
|
||||||
FULLBLOG_DOMAIN_NAME=""
|
if [[ $FULLBLOG_DOMAIN_NAME == "$WIKI_DOMAIN_NAME" ]]; then
|
||||||
|
FULLBLOG_DOMAIN_NAME=""
|
||||||
|
fi
|
||||||
|
if [ ! $DOMAIN_NAME ]; then
|
||||||
|
DOMAIN_NAME=$FULLBLOG_DOMAIN_NAME
|
||||||
|
fi
|
||||||
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
|
FULLBLOG_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 3p)
|
||||||
|
if [ ! $FULLBLOG_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||||
|
FULLBLOG_DOMAIN_NAME=""
|
||||||
|
else
|
||||||
|
if [[ $DOMAIN_NAME == "$FULLBLOG_DOMAIN_NAME" ]]; then
|
||||||
|
FREEDNS_SUBDOMAIN_CODE=$FULLBLOG_FREEDNS_SUBDOMAIN_CODE
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ ! $DOMAIN_NAME ]; then
|
|
||||||
DOMAIN_NAME=$FULLBLOG_DOMAIN_NAME
|
|
||||||
fi
|
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
|
||||||
FULLBLOG_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 3p)
|
|
||||||
if [[ $DOMAIN_NAME == "$FULLBLOG_DOMAIN_NAME" ]]; then
|
|
||||||
FREEDNS_SUBDOMAIN_CODE=$FULLBLOG_FREEDNS_SUBDOMAIN_CODE
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_FULL" ]]; then
|
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_FULL" ]]; then
|
||||||
|
@ -764,16 +776,22 @@ function interactive_configuration {
|
||||||
255) exit 0;;
|
255) exit 0;;
|
||||||
esac
|
esac
|
||||||
OWNCLOUD_DOMAIN_NAME=$(cat $data | sed -n 1p)
|
OWNCLOUD_DOMAIN_NAME=$(cat $data | sed -n 1p)
|
||||||
done
|
if [ $OWNCLOUD_DOMAIN_NAME ]; then
|
||||||
if [ ! $DOMAIN_NAME ]; then
|
if [ ! $DOMAIN_NAME ]; then
|
||||||
DOMAIN_NAME=$OWNCLOUD_DOMAIN_NAME
|
DOMAIN_NAME=$OWNCLOUD_DOMAIN_NAME
|
||||||
fi
|
fi
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
OWNCLOUD_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 2p)
|
OWNCLOUD_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 2p)
|
||||||
if [[ $DOMAIN_NAME == "$OWNCLOUD_DOMAIN_NAME" ]]; then
|
if [ ! $OWNCLOUD_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||||
FREEDNS_SUBDOMAIN_CODE=$OWNCLOUD_FREEDNS_SUBDOMAIN_CODE
|
OWNCLOUD_DOMAIN_NAME=""
|
||||||
|
else
|
||||||
|
if [[ $DOMAIN_NAME == "$OWNCLOUD_DOMAIN_NAME" ]]; then
|
||||||
|
FREEDNS_SUBDOMAIN_CODE=$OWNCLOUD_FREEDNS_SUBDOMAIN_CODE
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_FULL" ]]; then
|
if [[ $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_FULL" ]]; then
|
||||||
|
@ -801,16 +819,22 @@ function interactive_configuration {
|
||||||
255) exit 0;;
|
255) exit 0;;
|
||||||
esac
|
esac
|
||||||
REDMATRIX_DOMAIN_NAME=$(cat $data | sed -n 1p)
|
REDMATRIX_DOMAIN_NAME=$(cat $data | sed -n 1p)
|
||||||
done
|
if [ $REDMATRIX_DOMAIN_NAME ]; then
|
||||||
if [ ! $DOMAIN_NAME ]; then
|
if [ ! $DOMAIN_NAME ]; then
|
||||||
DOMAIN_NAME=$REDMATRIX_DOMAIN_NAME
|
DOMAIN_NAME=$REDMATRIX_DOMAIN_NAME
|
||||||
fi
|
fi
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
REDMATRIX_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 2p)
|
REDMATRIX_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 2p)
|
||||||
if [[ $DOMAIN_NAME == "$REDMATRIX_DOMAIN_NAME" ]]; then
|
if [ ! $REDMATRIX_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||||
FREEDNS_SUBDOMAIN_CODE=$REDMATRIX_FREEDNS_SUBDOMAIN_CODE
|
REDMATRIX_DOMAIN_NAME=""
|
||||||
|
else
|
||||||
|
if [[ $DOMAIN_NAME == "$REDMATRIX_DOMAIN_NAME" ]]; then
|
||||||
|
FREEDNS_SUBDOMAIN_CODE=$REDMATRIX_FREEDNS_SUBDOMAIN_CODE
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_FULL" ]]; then
|
if [[ $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_FULL" ]]; then
|
||||||
|
@ -838,19 +862,25 @@ function interactive_configuration {
|
||||||
255) exit 0;;
|
255) exit 0;;
|
||||||
esac
|
esac
|
||||||
MICROBLOG_DOMAIN_NAME=$(cat $data | sed -n 1p)
|
MICROBLOG_DOMAIN_NAME=$(cat $data | sed -n 1p)
|
||||||
if [[ $MICROBLOG_DOMAIN_NAME == "$REDMATRIX_DOMAIN_NAME" ]]; then
|
if [ $MICROBLOG_DOMAIN_NAME ]; then
|
||||||
MICROBLOG_DOMAIN_NAME=""
|
if [[ $MICROBLOG_DOMAIN_NAME == "$REDMATRIX_DOMAIN_NAME" ]]; then
|
||||||
|
MICROBLOG_DOMAIN_NAME=""
|
||||||
|
fi
|
||||||
|
if [ ! $DOMAIN_NAME ]; then
|
||||||
|
DOMAIN_NAME=$MICROBLOG_DOMAIN_NAME
|
||||||
|
fi
|
||||||
|
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||||
|
MICROBLOG_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 2p)
|
||||||
|
if [ ! $MICROBLOG_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||||
|
MICROBLOG_DOMAIN_NAME=""
|
||||||
|
else
|
||||||
|
if [[ $DOMAIN_NAME == "$MICROBLOG_DOMAIN_NAME" ]]; then
|
||||||
|
FREEDNS_SUBDOMAIN_CODE=$MICROBLOG_FREEDNS_SUBDOMAIN_CODE
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ ! $DOMAIN_NAME ]; then
|
|
||||||
DOMAIN_NAME=$MICROBLOG_DOMAIN_NAME
|
|
||||||
fi
|
|
||||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
|
||||||
MICROBLOG_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 2p)
|
|
||||||
if [[ $DOMAIN_NAME == "$MICROBLOG_DOMAIN_NAME" ]]; then
|
|
||||||
FREEDNS_SUBDOMAIN_CODE=$MICROBLOG_FREEDNS_SUBDOMAIN_CODE
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! $DOMAIN_NAME ]; then
|
if [ ! $DOMAIN_NAME ]; then
|
||||||
|
|
Loading…
Reference in New Issue