lower case

This commit is contained in:
Bob Mottram 2016-10-02 12:22:33 +01:00
parent fd31df500e
commit b87a325f09
1 changed files with 11 additions and 9 deletions

View File

@ -234,7 +234,7 @@ function upgrade_gogs {
}
function backup_local_gogs {
if ! grep -q "Gogs domain" $COMPLETION_FILE; then
if ! grep -q "gogs domain" $COMPLETION_FILE; then
return
fi
@ -242,7 +242,7 @@ function backup_local_gogs {
return
fi
GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Gogs domain" | awk -F ':' '{print $2}')
GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "gogs domain" | awk -F ':' '{print $2}')
echo $"Backing up gogs"
@ -258,14 +258,14 @@ function backup_local_gogs {
}
function restore_local_gogs {
if ! grep -q "Gogs domain" $COMPLETION_FILE; then
if ! grep -q "gogs domain" $COMPLETION_FILE; then
return
fi
if [ ! -d /home/$GOGS_USERNAME/gogs-repositories ]; then
return
fi
GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Gogs domain" | awk -F ':' '{print $2}')
GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "gogs domain" | awk -F ':' '{print $2}')
if [ ${#GIT_DOMAIN_NAME} -gt 2 ]; then
function_check gogs_create_database
@ -322,7 +322,7 @@ function restore_local_gogs {
function backup_remote_gogs {
if [ -d /home/$GOGS_USERNAME ]; then
GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Gogs domain" | awk -F ':' '{print $2}')
GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "gogs domain" | awk -F ':' '{print $2}')
function_check suspend_site
suspend_site ${GIT_DOMAIN_NAME}
@ -351,8 +351,8 @@ function backup_remote_gogs {
}
function restore_remote_gogs {
if grep -q "Gogs domain" $COMPLETION_FILE; then
GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Gogs domain" | awk -F ':' '{print $2}')
if grep -q "gogs domain" $COMPLETION_FILE; then
GIT_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "gogs domain" | awk -F ':' '{print $2}')
function_check gogs_create_database
gogs_create_database
@ -747,8 +747,10 @@ function install_gogs {
systemctl restart gogs
if ! grep -q "Gogs domain:" $COMPLETION_FILE; then
echo "Gogs domain:$GIT_DOMAIN_NAME" >> $COMPLETION_FILE
if ! grep -q "gogs domain:" $COMPLETION_FILE; then
echo "gogs domain:$GIT_DOMAIN_NAME" >> $COMPLETION_FILE
else
sed -i "s|gogs domain.*|gogs domain:$GIT_DOMAIN_NAME|g" $COMPLETION_FILE
fi
function_check configure_firewall_for_git