Skip to content
Snippets Groups Projects
Commit b87a325f authored by Bob Mottram's avatar Bob Mottram
Browse files

lower case

parent fd31df50
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment