Tidying
This commit is contained in:
parent
f95a702cac
commit
4c68294141
|
@ -197,9 +197,7 @@ function reconfigure_blog {
|
|||
}
|
||||
|
||||
function upgrade_blog {
|
||||
if grep -q "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
FULLBLOG_DOMAIN_NAME=$(grep "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
read_config_param "FULLBLOG_DOMAIN_NAME"
|
||||
|
||||
function_check set_repo_commit
|
||||
set_repo_commit /var/www/$FULLBLOG_DOMAIN_NAME/htdocs "blog commit" "$FULLBLOG_COMMIT" $FULLBLOG_REPO
|
||||
|
@ -333,9 +331,7 @@ function remove_blog {
|
|||
return
|
||||
fi
|
||||
|
||||
if grep -q "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
FULLBLOG_DOMAIN_NAME=$(grep "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
read_config_param "FULLBLOG_DOMAIN_NAME"
|
||||
nginx_dissite $FULLBLOG_DOMAIN_NAME
|
||||
if [ -f /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME ]; then
|
||||
rm -f /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME
|
||||
|
|
|
@ -351,12 +351,8 @@ function remove_gnusocial {
|
|||
if [ ${#MICROBLOG_DOMAIN_NAME} -eq 0 ]; then
|
||||
return
|
||||
fi
|
||||
if grep -q "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
MICROBLOG_DOMAIN_NAME=$(grep "MICROBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | head -n 1 | 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
|
||||
read_config_param "MICROBLOG_DOMAIN_NAME"
|
||||
read_config_param "MY_USERNAME"
|
||||
echo "Removing $MICROBLOG_DOMAIN_NAME"
|
||||
nginx_dissite $MICROBLOG_DOMAIN_NAME
|
||||
if [ -d /var/www/$MICROBLOG_DOMAIN_NAME ]; then
|
||||
|
|
|
@ -76,7 +76,7 @@ function add_user_sip {
|
|||
# add user for SIP STUN/TURN
|
||||
if [ -d /etc/turnserver ]; then
|
||||
if grep -q "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
DEFAULT_DOMAIN_NAME=$(grep "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE | head -n 1 | awk -F '=' '{print $2}')
|
||||
read_config_param "DEFAULT_DOMAIN_NAME"
|
||||
echo "${new_username}:${new_user_password}:${DEFAULT_DOMAIN_NAME}:authorized" >> /etc/turnserver/turnusers.txt
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -35,13 +35,17 @@ export TEXTDOMAINDIR="/usr/share/locale"
|
|||
|
||||
CONFIGURATION_FILE=$HOME/${PROJECT_NAME}.cfg
|
||||
|
||||
HOSTNAME=
|
||||
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
|
||||
for f in $UTILS_FILES
|
||||
do
|
||||
source $f
|
||||
done
|
||||
|
||||
AVATAR=
|
||||
|
||||
# get the blog hostname
|
||||
if grep -q "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
HOSTNAME=$(grep "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
read_config_param "FULLBLOG_DOMAIN_NAME"
|
||||
HOSTNAME=$FULLBLOG_DOMAIN_NAME
|
||||
|
||||
BASE_DIR=/var/www/$HOSTNAME/htdocs
|
||||
|
||||
|
|
|
@ -36,7 +36,11 @@ export TEXTDOMAINDIR="/usr/share/locale"
|
|||
CONFIGURATION_FILE=$HOME/${PROJECT_NAME}.cfg
|
||||
COMPLETION_FILE=$HOME/${PROJECT_NAME}-completed.txt
|
||||
|
||||
source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-validation
|
||||
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
|
||||
for f in $UTILS_FILES
|
||||
do
|
||||
source $f
|
||||
done
|
||||
|
||||
SSL_PROTOCOLS=
|
||||
SSL_CIPHERS=
|
||||
|
@ -359,9 +363,7 @@ function regenerate_ssh_host_keys {
|
|||
echo $'ssh small moduli removed'
|
||||
# update monkeysphere
|
||||
DEFAULT_DOMAIN_NAME=
|
||||
if grep -q "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE; then
|
||||
DEFAULT_DOMAIN_NAME=$(grep "DEFAULT_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
read_config_param "DEFAULT_DOMAIN_NAME"
|
||||
monkeysphere-host import-key /etc/ssh/ssh_host_rsa_key ssh://$DEFAULT_DOMAIN_NAME
|
||||
SSH_ONION_HOSTNAME=$(cat ${COMPLETION_FILE} | grep 'ssh onion domain' | awk -F ':' '{print $2}')
|
||||
monkeysphere-host import-key /etc/ssh/ssh_host_rsa_key ssh://$SSH_ONION_HOSTNAME
|
||||
|
@ -615,9 +617,7 @@ function enable_monkeysphere {
|
|||
esac
|
||||
|
||||
if [ $monkey ]; then
|
||||
if grep -q "MY_USERNAME" $CONFIGURATION_FILE; then
|
||||
MY_USERNAME=$(grep "MY_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
|
||||
fi
|
||||
read_config_param "MY_USERNAME"
|
||||
|
||||
if [ ! -f /home/$MY_USERNAME/.monkeysphere/authorized_user_ids ]; then
|
||||
dialog --title $"GPG based authentication" \
|
||||
|
|
Loading…
Reference in New Issue