Lower case

This commit is contained in:
Bob Mottram 2016-10-02 11:26:16 +01:00
parent 4825b0f038
commit 88dc5d35ac
1 changed files with 16 additions and 16 deletions

View File

@ -191,11 +191,11 @@ function install_interactive_blog {
} }
function change_password_blog { function change_password_blog {
if ! grep -q "Blog domain:" $COMPLETION_FILE; then if ! grep -q "blog domain:" $COMPLETION_FILE; then
return return
echo "Blog domain:$FULLBLOG_DOMAIN_NAME" >> $COMPLETION_FILE echo "blog domain:$FULLBLOG_DOMAIN_NAME" >> $COMPLETION_FILE
fi fi
FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Blog domain" | head -n 1 | awk -F ':' '{print $2}') FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "blog domain" | head -n 1 | awk -F ':' '{print $2}')
BLOG_USERNAME="$1" BLOG_USERNAME="$1"
BLOG_PASSWORD="$2" BLOG_PASSWORD="$2"
@ -221,7 +221,7 @@ function upgrade_blog {
fi 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
# update blog avatar # update blog avatar
${PROJECT_NAME}-blog ${PROJECT_NAME}-blog
@ -229,8 +229,8 @@ function upgrade_blog {
function backup_local_blog { function backup_local_blog {
FULLBLOG_DOMAIN_NAME='blog' FULLBLOG_DOMAIN_NAME='blog'
if grep -q "Blog domain" $COMPLETION_FILE; then if grep -q "blog domain" $COMPLETION_FILE; then
FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Blog domain" | awk -F ':' '{print $2}') FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "blog domain" | awk -F ':' '{print $2}')
fi fi
source_directory=/var/www/${FULLBLOG_DOMAIN_NAME}/htdocs source_directory=/var/www/${FULLBLOG_DOMAIN_NAME}/htdocs
@ -253,8 +253,8 @@ function backup_local_blog {
function restore_local_blog { function restore_local_blog {
FULLBLOG_DOMAIN_NAME='blog' FULLBLOG_DOMAIN_NAME='blog'
if grep -q "Blog domain" $COMPLETION_FILE; then if grep -q "blog domain" $COMPLETION_FILE; then
FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Blog domain" | awk -F ':' '{print $2}') FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "blog domain" | awk -F ':' '{print $2}')
fi fi
if [ $FULLBLOG_DOMAIN_NAME ]; then if [ $FULLBLOG_DOMAIN_NAME ]; then
echo $"Restoring blog installation" echo $"Restoring blog installation"
@ -295,8 +295,8 @@ function restore_local_blog {
} }
function backup_remote_blog { function backup_remote_blog {
if grep -q "Blog domain" $COMPLETION_FILE; then if grep -q "blog domain" $COMPLETION_FILE; then
FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Blog domain" | awk -F ':' '{print $2}') FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "blog domain" | awk -F ':' '{print $2}')
temp_backup_dir=/var/www/${FULLBLOG_DOMAIN_NAME}/htdocs temp_backup_dir=/var/www/${FULLBLOG_DOMAIN_NAME}/htdocs
if [ -d $temp_backup_dir ]; then if [ -d $temp_backup_dir ]; then
echo $"Backing up blog" echo $"Backing up blog"
@ -311,7 +311,7 @@ function backup_remote_blog {
function restore_remote_blog { function restore_remote_blog {
if [ -d $SERVER_DIRECTORY/backup/blog ]; then if [ -d $SERVER_DIRECTORY/backup/blog ]; then
FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Blog domain" | awk -F ':' '{print $2}') FULLBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "blog domain" | awk -F ':' '{print $2}')
echo $"Restoring blog installation $FULLBLOG_DOMAIN_NAME" echo $"Restoring blog installation $FULLBLOG_DOMAIN_NAME"
temp_restore_dir=/root/tempblog temp_restore_dir=/root/tempblog
mkdir $temp_restore_dir mkdir $temp_restore_dir
@ -619,10 +619,10 @@ function install_blog_from_repo {
git_clone $FULLBLOG_REPO htdocs git_clone $FULLBLOG_REPO htdocs
cd htdocs cd htdocs
git checkout $FULLBLOG_COMMIT -b $FULLBLOG_COMMIT git checkout $FULLBLOG_COMMIT -b $FULLBLOG_COMMIT
if ! grep -q "Blog commit" $COMPLETION_FILE; then if ! grep -q "blog commit" $COMPLETION_FILE; then
echo "Blog commit:$FULLBLOG_COMMIT" >> $COMPLETION_FILE echo "blog commit:$FULLBLOG_COMMIT" >> $COMPLETION_FILE
else else
sed -i "s/Blog commit.*/Blog commit:$FULLBLOG_COMMIT/g" $COMPLETION_FILE sed -i "s/blog commit.*/blog commit:$FULLBLOG_COMMIT/g" $COMPLETION_FILE
fi fi
} }
@ -705,8 +705,8 @@ function install_blog {
function_check add_ddns_domain function_check add_ddns_domain
add_ddns_domain $FULLBLOG_DOMAIN_NAME add_ddns_domain $FULLBLOG_DOMAIN_NAME
if ! grep -q "Blog domain:" $COMPLETION_FILE; then if ! grep -q "blog domain:" $COMPLETION_FILE; then
echo "Blog domain:$FULLBLOG_DOMAIN_NAME" >> $COMPLETION_FILE echo "blog domain:$FULLBLOG_DOMAIN_NAME" >> $COMPLETION_FILE
fi fi
} }