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