Remove subdomain codes
This commit is contained in:
parent
4c492df139
commit
545813bdaa
10
README.md
10
README.md
|
@ -114,14 +114,6 @@ Add the following, and set the values as needed.
|
|||
|
||||
Both of the IP addresses are local IP addresses, typically of the form 192.168.x.x, with one being for the system and the other being for the internet router.
|
||||
|
||||
If you are using FreeDNS as a dynamic DNS provider then you can add the following to your configuration file, setting the subdomain codes as appropriate. You can find the codes on the FreeDNS site under "Dynamic DNS" followed by "quick cron example" then look for the code on the last line between the ? and = characters.
|
||||
|
||||
FULLBLOG_FREEDNS_SUBDOMAIN_CODE=
|
||||
REDMATRIX_FREEDNS_SUBDOMAIN_CODE=
|
||||
MICROBLOG_FREEDNS_SUBDOMAIN_CODE=
|
||||
OWNCLOUD_FREEDNS_SUBDOMAIN_CODE=
|
||||
WIKI_FREEDNS_SUBDOMAIN_CODE=
|
||||
|
||||
Save the configuration file and exit from your editor.
|
||||
|
||||
Now you can begin the installation. If you are doing this on a Beaglebone Black:
|
||||
|
@ -132,7 +124,7 @@ Or on any other system don't include the *--bbb* option.
|
|||
|
||||
freedombone -d [default domain name] -u [username] --ddns [dynamic DNS provider domain] --ddnsuser [dynamic DNS username] --ddnspass [dynamic DNS password]
|
||||
|
||||
The above command should be run in the same directory in which your configuration file exists. You can use any of your domains as the default one, but typically the default domain is the same as the one for your wiki. If you are using FreeDNS as the dynamic DNS provider then also add the -c option to specify the code corresponding to the subdomain.
|
||||
The above command should be run in the same directory in which your configuration file exists. You can use any of your domains as the default one, but typically the default domain is the same as the one for your wiki.
|
||||
|
||||
Also see the manpage for additional options which can be used instead of a configuration file. If you don't specify a variant type with the final option then everything will be installed. If you have a *freedombone.cfg* file then it should be in the same directory from which the *freedombone* command is run.
|
||||
|
||||
|
|
|
@ -118,16 +118,6 @@ ROUTER_IP_ADDRESS=
|
|||
|
||||
Both of the IP addresses are local IP addresses, typically of the form 192.168.x.x, with one being for the system and the other being for the internet router.
|
||||
|
||||
If you are using FreeDNS as a dynamic DNS provider then you can add the following to your configuration file, setting the subdomain codes as appropriate. You can find the codes on the FreeDNS site under "Dynamic DNS" followed by "quick cron example" then look for the code on the last line between the ? and = characters.
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
FULLBLOG_FREEDNS_SUBDOMAIN_CODE=
|
||||
REDMATRIX_FREEDNS_SUBDOMAIN_CODE=
|
||||
MICROBLOG_FREEDNS_SUBDOMAIN_CODE=
|
||||
OWNCLOUD_FREEDNS_SUBDOMAIN_CODE=
|
||||
WIKI_FREEDNS_SUBDOMAIN_CODE=
|
||||
#+END_SRC
|
||||
|
||||
Save the configuration file and exit from your editor.
|
||||
|
||||
Now you can begin the installation. If you are doing this on a Beaglebone Black:
|
||||
|
@ -142,7 +132,7 @@ Or on any other system don't include the *--bbb* option.
|
|||
freedombone -d [default domain name] -u [username] --ddns [dynamic DNS provider domain] --ddnsuser [dynamic DNS username] --ddnspass [dynamic DNS password]
|
||||
#+END_SRC
|
||||
|
||||
The above command should be run in the same directory in which your configuration file exists. You can use any of your domains as the default one, but typically the default domain is the same as the one for your wiki. If you are using FreeDNS as the dynamic DNS provider then also add the -c option to specify the code corresponding to the subdomain.
|
||||
The above command should be run in the same directory in which your configuration file exists. You can use any of your domains as the default one, but typically the default domain is the same as the one for your wiki.
|
||||
|
||||
Also see the manpage for additional options which can be used instead of a configuration file. If you don't specify a variant type with the final option then everything will be installed. If you have a *freedombone.cfg* file then it should be in the same directory from which the *freedombone* command is run.
|
||||
|
||||
|
|
Binary file not shown.
322
src/freedombone
322
src/freedombone
|
@ -30,60 +30,11 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Summary
|
||||
# =======
|
||||
#
|
||||
# This script is intended to be run on the target device, which
|
||||
# is typically a Beaglebone Black.
|
||||
#
|
||||
# To be able to run this script you need to get to a condition
|
||||
# where you have Debian Jessie installed, with at least one
|
||||
# unprivileged user account and at least one subdomain created on
|
||||
# https://freedns.afraid.org/. If you're not installing on a
|
||||
# Beaglebone Black then set the variable INSTALLING_ON_BBB to "no"
|
||||
#
|
||||
# Note on dynamic dns
|
||||
# ===================
|
||||
#
|
||||
# I'm not particularly trying to promote freedns.afraid.org
|
||||
# as a service, it just happens to be a dynamic DNS system which
|
||||
# provides free (as in beer) accounts, and I'm trying to make the
|
||||
# process of setting up a working server as trivial as possible.
|
||||
# Other dynamic DNS systems are available, and if you're using
|
||||
# something different then comment out the section within
|
||||
# argument_checks and the call to dynamic_dns_freedns.
|
||||
#
|
||||
# Prerequisites
|
||||
# =============
|
||||
#
|
||||
# You will need to initially prepare a microSD card with a Debian
|
||||
# image on it. This can be done using the initial_setup.sh script.
|
||||
#
|
||||
# If you are not using a Beaglebone Black then just prepare the
|
||||
# target system with a fresh installation of Debian Jessie.
|
||||
#
|
||||
# Configuration file
|
||||
# ==================
|
||||
# If you don't want to edit this script directly then you can
|
||||
# create a configuration file called freedombone.cfg, which should
|
||||
# be in the same directory as install-freedombone.sh.
|
||||
# Within the configuration file you can specify the main settings
|
||||
# such as:
|
||||
#
|
||||
# INSTALLING_ON_BBB=yes
|
||||
# SSH_PORT=2222
|
||||
# MICROBLOG_DOMAIN_NAME=mydomain
|
||||
# MICROBLOG_FREEDNS_SUBDOMAIN_CODE=[code]
|
||||
# ...
|
||||
#
|
||||
# Note that there are no spaces around the equals.
|
||||
|
||||
NO_OF_ARGS=$#
|
||||
|
||||
DOMAIN_NAME=
|
||||
MY_USERNAME=
|
||||
FREEDNS_SUBDOMAIN_CODE=
|
||||
SYSTEM_TYPE=
|
||||
|
||||
# Are we installing on a Beaglebone Black (BBB) or some other system?
|
||||
|
@ -114,7 +65,6 @@ DDNS_PROVIDER="default@freedns.afraid.org"
|
|||
DDNS_USERNAME=
|
||||
DDNS_PASSWORD=
|
||||
CURRENT_DDNS_DOMAIN=
|
||||
CURRENT_DDNS_CODE=
|
||||
|
||||
# Minimum number of characters in a password
|
||||
MINIMUM_PASSWORD_LENGTH=10
|
||||
|
@ -163,39 +113,33 @@ PUBLIC_MAILING_LIST_DIRECTORY="/var/spool/mlmmj"
|
|||
# There should be no spaces in the name
|
||||
PRIVATE_MAILING_LIST=
|
||||
|
||||
# Domain name or freedns subdomain for mediagoblin installation
|
||||
# Domain name for mediagoblin installation
|
||||
MEDIAGOBLIN_DOMAIN_NAME=
|
||||
MEDIAGOBLIN_FREEDNS_SUBDOMAIN_CODE=
|
||||
MEDIAGOBLIN_REPO=""
|
||||
MEDIAGOBLIN_ADMIN_PASSWORD=
|
||||
|
||||
# Domain name or freedns subdomain for microblog installation
|
||||
# Domain name for microblog installation
|
||||
MICROBLOG_DOMAIN_NAME=
|
||||
MICROBLOG_FREEDNS_SUBDOMAIN_CODE=
|
||||
MICROBLOG_REPO="git://gitorious.org/social/mainline.git"
|
||||
MICROBLOG_ADMIN_PASSWORD=
|
||||
|
||||
# Domain name or redmatrix installation
|
||||
REDMATRIX_DOMAIN_NAME=
|
||||
REDMATRIX_FREEDNS_SUBDOMAIN_CODE=
|
||||
REDMATRIX_REPO="https://github.com/friendica/red.git"
|
||||
REDMATRIX_ADDONS_REPO="https://github.com/friendica/red-addons.git"
|
||||
REDMATRIX_ADMIN_PASSWORD=
|
||||
|
||||
# Domain name and freedns subdomain for Owncloud installation
|
||||
# Domain name for Owncloud installation
|
||||
OWNCLOUD_DOMAIN_NAME=
|
||||
OWNCLOUD_FREEDNS_SUBDOMAIN_CODE=
|
||||
OWNCLOUD_ADMIN_PASSWORD=
|
||||
|
||||
# Domain name and freedns subdomain for your wiki
|
||||
# Domain name for your wiki
|
||||
WIKI_DOMAIN_NAME=
|
||||
WIKI_FREEDNS_SUBDOMAIN_CODE=
|
||||
WIKI_ADMIN_PASSWORD=
|
||||
WIKI_TITLE="Freedombone Wiki"
|
||||
|
||||
# Domain name and freedns subdomain for your blog
|
||||
# Domain name for your blog
|
||||
FULLBLOG_DOMAIN_NAME=
|
||||
FULLBLOG_FREEDNS_SUBDOMAIN_CODE=
|
||||
MY_BLOG_TITLE="My Blog"
|
||||
MY_BLOG_SUBTITLE="Another Freedombone Blog"
|
||||
|
||||
|
@ -340,7 +284,7 @@ CJDNS_PORT=
|
|||
|
||||
function show_help {
|
||||
echo ''
|
||||
echo 'freedombone -d [domain] -u [username] -c [FreeDNS subdomain code] -s [system type]'
|
||||
echo 'freedombone -d [domain] -u [username] -s [system type]'
|
||||
echo ''
|
||||
echo ' -h --help Show help'
|
||||
echo ' menuconfig Easy interactive installation'
|
||||
|
@ -354,13 +298,6 @@ function show_help {
|
|||
echo ' --ddnsuser Dynamic DNS provider username'
|
||||
echo ' --ddnspass Dynamic DNS provider password'
|
||||
echo ''
|
||||
echo ' -c --code Default domain FreeDNS code'
|
||||
echo ' --microblogcode Microblog FreeDNS code'
|
||||
echo ' --wikicode Wiki FreeDNS code'
|
||||
echo ' --owncloudcode Owncloud FreeDNS code'
|
||||
echo ' --redmatrixcode Redmatrix FreeDNS code'
|
||||
echo ' --blogcode Blog FreeDNS code'
|
||||
echo ''
|
||||
echo ' --microblogdomain Microblog domain name'
|
||||
echo ' --wikidomain Wiki domain name'
|
||||
echo ' --blogdomain Blog domain name'
|
||||
|
@ -457,39 +394,21 @@ function save_configuration_file {
|
|||
if [ $WIKI_DOMAIN_NAME ]; then
|
||||
echo "WIKI_DOMAIN_NAME=$WIKI_DOMAIN_NAME" >> freedombone.cfg
|
||||
fi
|
||||
if [ $WIKI_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||
echo "WIKI_FREEDNS_SUBDOMAIN_CODE=$WIKI_FREEDNS_SUBDOMAIN_CODE" >> freedombone.cfg
|
||||
fi
|
||||
if [ $FREEDNS_SUBDOMAIN_CODE ]; then
|
||||
echo "FREEDNS_SUBDOMAIN_CODE=$FREEDNS_SUBDOMAIN_CODE" >> freedombone.cfg
|
||||
fi
|
||||
if [ $MY_BLOG_TITLE ]; then
|
||||
echo "MY_BLOG_TITLE=$MY_BLOG_TITLE" >> freedombone.cfg
|
||||
fi
|
||||
if [ $FULLBLOG_DOMAIN_NAME ]; then
|
||||
echo "FULLBLOG_DOMAIN_NAME=$FULLBLOG_DOMAIN_NAME" >> freedombone.cfg
|
||||
fi
|
||||
if [ $FULLBLOG_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||
echo "FULLBLOG_FREEDNS_SUBDOMAIN_CODE=$FULLBLOG_FREEDNS_SUBDOMAIN_CODE" >> freedombone.cfg
|
||||
fi
|
||||
if [ $OWNCLOUD_DOMAIN_NAME ]; then
|
||||
echo "OWNCLOUD_DOMAIN_NAME=$OWNCLOUD_DOMAIN_NAME" >> freedombone.cfg
|
||||
fi
|
||||
if [ $OWNCLOUD_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||
echo "OWNCLOUD_FREEDNS_SUBDOMAIN_CODE=$OWNCLOUD_FREEDNS_SUBDOMAIN_CODE" >> freedombone.cfg
|
||||
fi
|
||||
if [ $REDMATRIX_DOMAIN_NAME ]; then
|
||||
echo "REDMATRIX_DOMAIN_NAME=$REDMATRIX_DOMAIN_NAME" >> freedombone.cfg
|
||||
fi
|
||||
if [ $REDMATRIX_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||
echo "REDMATRIX_FREEDNS_SUBDOMAIN_CODE=$REDMATRIX_FREEDNS_SUBDOMAIN_CODE" >> freedombone.cfg
|
||||
fi
|
||||
if [ $MICROBLOG_DOMAIN_NAME ]; then
|
||||
echo "MICROBLOG_DOMAIN_NAME=$MICROBLOG_DOMAIN_NAME" >> freedombone.cfg
|
||||
fi
|
||||
if [ $MICROBLOG_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||
echo "MICROBLOG_FREEDNS_SUBDOMAIN_CODE=$MICROBLOG_FREEDNS_SUBDOMAIN_CODE" >> freedombone.cfg
|
||||
fi
|
||||
}
|
||||
|
||||
function interactive_configuration {
|
||||
|
@ -675,22 +594,12 @@ function interactive_configuration {
|
|||
do
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "Wiki Configuration" \
|
||||
--form "\nPlease enter your wiki details:" 11 55 4 \
|
||||
"Title:" 1 1 "My Wiki" 1 16 16 15 \
|
||||
"Domain:" 2 1 "" 2 16 16 15 \
|
||||
"FreeDNS code:" 3 1 "" 3 16 16 15 \
|
||||
2> $data
|
||||
else
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "Wiki Configuration" \
|
||||
--form "\nPlease enter your wiki details:" 11 55 3 \
|
||||
"Title:" 1 1 "My Wiki" 1 16 16 15 \
|
||||
"Domain:" 2 1 "" 2 16 16 15 \
|
||||
2> $data
|
||||
fi
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "Wiki Configuration" \
|
||||
--form "\nPlease enter your wiki details:" 11 55 3 \
|
||||
"Title:" 1 1 "My Wiki" 1 16 16 15 \
|
||||
"Domain:" 2 1 "" 2 16 16 15 \
|
||||
2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) exit 0;;
|
||||
|
@ -702,16 +611,6 @@ function interactive_configuration {
|
|||
if [ ! $DOMAIN_NAME ]; then
|
||||
DOMAIN_NAME=$WIKI_DOMAIN_NAME
|
||||
fi
|
||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||
WIKI_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 3p)
|
||||
if [ ! $WIKI_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||
WIKI_DOMAIN_NAME=""
|
||||
else
|
||||
if [[ $DOMAIN_NAME == "$WIKI_DOMAIN_NAME" ]]; then
|
||||
FREEDNS_SUBDOMAIN_CODE=$WIKI_FREEDNS_SUBDOMAIN_CODE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -721,22 +620,12 @@ function interactive_configuration {
|
|||
do
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "Blog Configuration" \
|
||||
--form "\nPlease enter your blog details:" 11 55 4 \
|
||||
"Title:" 1 1 "My Blog" 1 16 16 15 \
|
||||
"Domain:" 2 1 "" 2 16 16 15 \
|
||||
"FreeDNS code:" 3 1 "" 3 16 16 15 \
|
||||
2> $data
|
||||
else
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "Blog Configuration" \
|
||||
--form "\nPlease enter your blog details:" 11 55 3 \
|
||||
"Title:" 1 1 "My Blog" 1 16 16 15 \
|
||||
"Domain:" 2 1 "" 2 16 16 15 \
|
||||
2> $data
|
||||
fi
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "Blog Configuration" \
|
||||
--form "\nPlease enter your blog details:" 11 55 3 \
|
||||
"Title:" 1 1 "My Blog" 1 16 16 15 \
|
||||
"Domain:" 2 1 "" 2 16 16 15 \
|
||||
2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) exit 0;;
|
||||
|
@ -751,16 +640,6 @@ function interactive_configuration {
|
|||
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
|
||||
done
|
||||
fi
|
||||
|
@ -770,20 +649,11 @@ function interactive_configuration {
|
|||
do
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "Owncloud Configuration" \
|
||||
--form "\nPlease enter your Owncloud details:" 11 55 3 \
|
||||
"Domain:" 1 1 "" 1 16 16 15 \
|
||||
"FreeDNS code:" 2 1 "" 2 16 16 15 \
|
||||
2> $data
|
||||
else
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "Owncloud Configuration" \
|
||||
--form "\nPlease enter your Owncloud details:" 11 55 3 \
|
||||
"Domain:" 1 1 "" 1 16 16 15 \
|
||||
2> $data
|
||||
fi
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "Owncloud Configuration" \
|
||||
--form "\nPlease enter your Owncloud details:" 11 55 3 \
|
||||
"Domain:" 1 1 "" 1 16 16 15 \
|
||||
2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) exit 0;;
|
||||
|
@ -794,16 +664,6 @@ function interactive_configuration {
|
|||
if [ ! $DOMAIN_NAME ]; then
|
||||
DOMAIN_NAME=$OWNCLOUD_DOMAIN_NAME
|
||||
fi
|
||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||
OWNCLOUD_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 2p)
|
||||
if [ ! $OWNCLOUD_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||
OWNCLOUD_DOMAIN_NAME=""
|
||||
else
|
||||
if [[ $DOMAIN_NAME == "$OWNCLOUD_DOMAIN_NAME" ]]; then
|
||||
FREEDNS_SUBDOMAIN_CODE=$OWNCLOUD_FREEDNS_SUBDOMAIN_CODE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -813,20 +673,11 @@ function interactive_configuration {
|
|||
do
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "RedMatrix Configuration" \
|
||||
--form "\nPlease enter your RedMatrix details:" 11 55 3 \
|
||||
"Domain:" 1 1 "" 1 16 16 15 \
|
||||
"FreeDNS code:" 2 1 "" 2 16 16 15 \
|
||||
2> $data
|
||||
else
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "RedMatrix Configuration" \
|
||||
--form "\nPlease enter your RedMatrix details:" 11 55 3 \
|
||||
"Domain:" 1 1 "" 1 16 16 15 \
|
||||
2> $data
|
||||
fi
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "RedMatrix Configuration" \
|
||||
--form "\nPlease enter your RedMatrix details:" 11 55 3 \
|
||||
"Domain:" 1 1 "" 1 16 16 15 \
|
||||
2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) exit 0;;
|
||||
|
@ -837,16 +688,6 @@ function interactive_configuration {
|
|||
if [ ! $DOMAIN_NAME ]; then
|
||||
DOMAIN_NAME=$REDMATRIX_DOMAIN_NAME
|
||||
fi
|
||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||
REDMATRIX_FREEDNS_SUBDOMAIN_CODE=$(cat $data | sed -n 2p)
|
||||
if [ ! $REDMATRIX_FREEDNS_SUBDOMAIN_CODE ]; then
|
||||
REDMATRIX_DOMAIN_NAME=""
|
||||
else
|
||||
if [[ $DOMAIN_NAME == "$REDMATRIX_DOMAIN_NAME" ]]; then
|
||||
FREEDNS_SUBDOMAIN_CODE=$REDMATRIX_FREEDNS_SUBDOMAIN_CODE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
@ -856,20 +697,11 @@ function interactive_configuration {
|
|||
do
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "Microblog Configuration" \
|
||||
--form "\nPlease enter your Microblog details:" 11 55 3 \
|
||||
"Domain:" 1 1 "" 1 16 16 15 \
|
||||
"FreeDNS code:" 2 1 "" 2 16 16 15 \
|
||||
2> $data
|
||||
else
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "Microblog Configuration" \
|
||||
--form "\nPlease enter your Microblog details:" 11 55 3 \
|
||||
"Domain:" 1 1 "" 1 16 16 15 \
|
||||
2> $data
|
||||
fi
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--title "Microblog Configuration" \
|
||||
--form "\nPlease enter your Microblog details:" 11 55 3 \
|
||||
"Domain:" 1 1 "" 1 16 16 15 \
|
||||
2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) exit 0;;
|
||||
|
@ -883,16 +715,6 @@ function interactive_configuration {
|
|||
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
|
||||
done
|
||||
fi
|
||||
|
@ -911,22 +733,6 @@ function interactive_configuration {
|
|||
255) exit 0;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||
while [ ! $FREEDNS_SUBDOMAIN_CODE ]
|
||||
do
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--inputbox "FreeDNS subdomain code" 10 30 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
0) FREEDNS_SUBDOMAIN_CODE=$(cat $data);;
|
||||
1) exit 0;;
|
||||
255) exit 0;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
while [ ! $MY_EMAIL_ADDRESS ]
|
||||
|
@ -980,61 +786,31 @@ case $key in
|
|||
shift
|
||||
MICROBLOG_DOMAIN_NAME="$1"
|
||||
;;
|
||||
# microblog domain code (freedns)
|
||||
--microblogcode)
|
||||
shift
|
||||
MICROBLOG_FREEDNS_SUBDOMAIN_CODE="$1"
|
||||
;;
|
||||
# wiki domain name
|
||||
--wikidomain)
|
||||
shift
|
||||
WIKI_DOMAIN_NAME="$1"
|
||||
;;
|
||||
# wiki domain code (freedns)
|
||||
--wikicode)
|
||||
shift
|
||||
WIKI_FREEDNS_SUBDOMAIN_CODE="$1"
|
||||
;;
|
||||
# blog domain name
|
||||
--blogdomain)
|
||||
shift
|
||||
FULLBLOG_DOMAIN_NAME="$1"
|
||||
;;
|
||||
# blog domain code (freedns)
|
||||
--blogcode)
|
||||
shift
|
||||
FULLBLOG_FREEDNS_SUBDOMAIN_CODE="$1"
|
||||
;;
|
||||
# owncloud domain name
|
||||
--ownclouddomain)
|
||||
shift
|
||||
OWNCLOUD_DOMAIN_NAME="$1"
|
||||
;;
|
||||
# owncloud domain code (freedns)
|
||||
--owncloudcode)
|
||||
shift
|
||||
OWNCLOUD_FREEDNS_SUBDOMAIN_CODE="$1"
|
||||
;;
|
||||
# redmatrix domain name
|
||||
--redmatrixdomain)
|
||||
shift
|
||||
REDMATRIX_DOMAIN_NAME="$1"
|
||||
;;
|
||||
# redmatrix domain code (freedns)
|
||||
--redmatrixcode)
|
||||
shift
|
||||
REDMATRIX_FREEDNS_SUBDOMAIN_CODE="$1"
|
||||
;;
|
||||
# default domain name
|
||||
-d|--domain)
|
||||
shift
|
||||
DOMAIN_NAME="$1"
|
||||
;;
|
||||
# default domain code (freedns)
|
||||
-c|--code)
|
||||
shift
|
||||
FREEDNS_SUBDOMAIN_CODE="$1"
|
||||
;;
|
||||
# The type of system
|
||||
-s|--system)
|
||||
shift
|
||||
|
@ -1143,12 +919,6 @@ function parse_args {
|
|||
echo 'Please provide the password for your dynamic DNS provider with the --ddnspass option'
|
||||
exit 6382
|
||||
fi
|
||||
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
|
||||
if [ ! $FREEDNS_SUBDOMAIN_CODE ]; then
|
||||
show_help
|
||||
exit 4
|
||||
fi
|
||||
fi
|
||||
if [ ! $SYSTEM_TYPE ]; then
|
||||
SYSTEM_TYPE=$VARIANT_FULL
|
||||
fi
|
||||
|
@ -1239,33 +1009,18 @@ function read_configuration {
|
|||
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_FREEDNS_SUBDOMAIN_CODE" $CONFIGURATION_FILE; then
|
||||
MICROBLOG_FREEDNS_SUBDOMAIN_CODE=$(grep "MICROBLOG_FREEDNS_SUBDOMAIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "REDMATRIX_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
REDMATRIX_DOMAIN_NAME=$(grep "REDMATRIX_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "REDMATRIX_FREEDNS_SUBDOMAIN_CODE" $CONFIGURATION_FILE; then
|
||||
REDMATRIX_FREEDNS_SUBDOMAIN_CODE=$(grep "REDMATRIX_FREEDNS_SUBDOMAIN_CODE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "OWNCLOUD_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
OWNCLOUD_DOMAIN_NAME=$(grep "OWNCLOUD_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
if grep -q "OWNCLOUD_FREEDNS_SUBDOMAIN_CODE" $CONFIGURATION_FILE; then
|
||||
OWNCLOUD_FREEDNS_SUBDOMAIN_CODE=$(grep "OWNCLOUD_FREEDNS_SUBDOMAIN_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_FREEDNS_SUBDOMAIN_CODE" $CONFIGURATION_FILE; then
|
||||
WIKI_FREEDNS_SUBDOMAIN_CODE=$(grep "WIKI_FREEDNS_SUBDOMAIN_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_FREEDNS_SUBDOMAIN_CODE" $CONFIGURATION_FILE; then
|
||||
FULLBLOG_FREEDNS_SUBDOMAIN_CODE=$(grep "FULLBLOG_FREEDNS_SUBDOMAIN_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
|
||||
|
@ -6240,7 +5995,6 @@ function add_ddns_domain {
|
|||
|
||||
# clear the arguments
|
||||
CURRENT_DDNS_DOMAIN=
|
||||
CURRENT_DDNS_CODE=
|
||||
}
|
||||
|
||||
function install_owncloud {
|
||||
|
@ -6271,7 +6025,6 @@ function install_owncloud {
|
|||
# if this is exclusively a cloud setup
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" ]]; then
|
||||
OWNCLOUD_DOMAIN_NAME=$DOMAIN_NAME
|
||||
OWNCLOUD_FREEDNS_SUBDOMAIN_CODE=$FREEDNS_SUBDOMAIN_CODE
|
||||
fi
|
||||
if [ ! $OWNCLOUD_DOMAIN_NAME ]; then
|
||||
return
|
||||
|
@ -6462,7 +6215,6 @@ quit" > $INSTALL_DIR/batch.sql
|
|||
|
||||
# update the dynamic DNS
|
||||
CURRENT_DDNS_DOMAIN=$OWNCLOUD_DOMAIN_NAME
|
||||
CURRENT_DDNS_CODE=$OWNCLOUD_FREEDNS_SUBDOMAIN_CODE
|
||||
add_ddns_domain
|
||||
|
||||
echo 'install_owncloud' >> $COMPLETION_FILE
|
||||
|
@ -6698,7 +6450,6 @@ function install_wiki {
|
|||
# if everything is being installed or if this is exclusively a writer setup
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_FULL" || $SYSTEM_TYPE == "$VARIANT_WRITER" ]]; then
|
||||
WIKI_DOMAIN_NAME=$DOMAIN_NAME
|
||||
WIKI_FREEDNS_SUBDOMAIN_CODE=$FREEDNS_SUBDOMAIN_CODE
|
||||
fi
|
||||
if [ ! $WIKI_DOMAIN_NAME ]; then
|
||||
return
|
||||
|
@ -6940,7 +6691,6 @@ function install_wiki {
|
|||
|
||||
# update the dynamic DNS
|
||||
CURRENT_DDNS_DOMAIN=$WIKI_DOMAIN_NAME
|
||||
CURRENT_DDNS_CODE=$WIKI_FREEDNS_SUBDOMAIN_CODE
|
||||
add_ddns_domain
|
||||
|
||||
# add some post-install instructions
|
||||
|
@ -7201,7 +6951,6 @@ function install_blog {
|
|||
|
||||
# update the dynamic DNS
|
||||
CURRENT_DDNS_DOMAIN=$FULLBLOG_DOMAIN_NAME
|
||||
CURRENT_DDNS_CODE=$FULLBLOG_FREEDNS_SUBDOMAIN_CODE
|
||||
add_ddns_domain
|
||||
|
||||
echo 'install_blog' >> $COMPLETION_FILE
|
||||
|
@ -7276,7 +7025,6 @@ quit" > $INSTALL_DIR/batch.sql
|
|||
|
||||
# update the dynamic DNS
|
||||
CURRENT_DDNS_DOMAIN=$MICROBLOG_DOMAIN_NAME
|
||||
CURRENT_DDNS_CODE=$MICROBLOG_FREEDNS_SUBDOMAIN_CODE
|
||||
add_ddns_domain
|
||||
|
||||
echo 'server {' > /etc/nginx/sites-available/$MICROBLOG_DOMAIN_NAME
|
||||
|
@ -7459,7 +7207,6 @@ function install_redmatrix {
|
|||
# if this is exclusively a social setup
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_SOCIAL" ]]; then
|
||||
REDMATRIX_DOMAIN_NAME=$DOMAIN_NAME
|
||||
REDMATRIX_FREEDNS_SUBDOMAIN_CODE=$FREEDNS_SUBDOMAIN_CODE
|
||||
fi
|
||||
if [ ! $REDMATRIX_DOMAIN_NAME ]; then
|
||||
return
|
||||
|
@ -7517,7 +7264,6 @@ quit" > $INSTALL_DIR/batch.sql
|
|||
|
||||
# update the dynamic DNS
|
||||
CURRENT_DDNS_DOMAIN=$REDMATRIX_DOMAIN_NAME
|
||||
CURRENT_DDNS_CODE=$REDMATRIX_FREEDNS_SUBDOMAIN_CODE
|
||||
add_ddns_domain
|
||||
|
||||
echo 'server {' > /etc/nginx/sites-available/$REDMATRIX_DOMAIN_NAME
|
||||
|
@ -7820,7 +7566,6 @@ function install_mediagoblin {
|
|||
# if this is exclusively a writer setup
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
|
||||
MEDIAGOBLIN_DOMAIN_NAME=$DOMAIN_NAME
|
||||
MEDIAGOBLIN_FREEDNS_SUBDOMAIN_CODE=$FREEDNS_SUBDOMAIN_CODE
|
||||
fi
|
||||
if [ ! $MEDIAGOBLIN_DOMAIN_NAME ]; then
|
||||
return
|
||||
|
@ -7859,7 +7604,6 @@ function install_mediagoblin {
|
|||
|
||||
# update the dynamic DNS
|
||||
CURRENT_DDNS_DOMAIN=$MEDIAGOBLIN_DOMAIN_NAME
|
||||
CURRENT_DDNS_CODE=$MEDIAGOBLIN_FREEDNS_SUBDOMAIN_CODE
|
||||
add_ddns_domain
|
||||
|
||||
# see https://wiki.mediagoblin.org/Deployment / uwsgi with configs
|
||||
|
|
Loading…
Reference in New Issue