lower case
This commit is contained in:
parent
fd31df500e
commit
b87a325f09
|
@ -234,7 +234,7 @@ function upgrade_gogs {
|
||||||
}
|
}
|
||||||
|
|
||||||
function backup_local_gogs {
|
function backup_local_gogs {
|
||||||
if ! grep -q "Gogs domain" $COMPLETION_FILE; then
|
if ! grep -q "gogs domain" $COMPLETION_FILE; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ function backup_local_gogs {
|
||||||
return
|
return
|
||||||
fi
|
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"
|
echo $"Backing up gogs"
|
||||||
|
|
||||||
|
@ -258,14 +258,14 @@ function backup_local_gogs {
|
||||||
}
|
}
|
||||||
|
|
||||||
function restore_local_gogs {
|
function restore_local_gogs {
|
||||||
if ! grep -q "Gogs domain" $COMPLETION_FILE; then
|
if ! grep -q "gogs domain" $COMPLETION_FILE; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ ! -d /home/$GOGS_USERNAME/gogs-repositories ]; then
|
if [ ! -d /home/$GOGS_USERNAME/gogs-repositories ]; then
|
||||||
return
|
return
|
||||||
fi
|
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
|
if [ ${#GIT_DOMAIN_NAME} -gt 2 ]; then
|
||||||
function_check gogs_create_database
|
function_check gogs_create_database
|
||||||
|
@ -322,7 +322,7 @@ function restore_local_gogs {
|
||||||
|
|
||||||
function backup_remote_gogs {
|
function backup_remote_gogs {
|
||||||
if [ -d /home/$GOGS_USERNAME ]; then
|
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
|
function_check suspend_site
|
||||||
suspend_site ${GIT_DOMAIN_NAME}
|
suspend_site ${GIT_DOMAIN_NAME}
|
||||||
|
|
||||||
|
@ -351,8 +351,8 @@ function backup_remote_gogs {
|
||||||
}
|
}
|
||||||
|
|
||||||
function restore_remote_gogs {
|
function restore_remote_gogs {
|
||||||
if grep -q "Gogs domain" $COMPLETION_FILE; then
|
if grep -q "gogs domain" $COMPLETION_FILE; 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 gogs_create_database
|
function_check gogs_create_database
|
||||||
gogs_create_database
|
gogs_create_database
|
||||||
|
@ -747,8 +747,10 @@ function install_gogs {
|
||||||
|
|
||||||
systemctl restart gogs
|
systemctl restart gogs
|
||||||
|
|
||||||
if ! grep -q "Gogs domain:" $COMPLETION_FILE; then
|
if ! grep -q "gogs domain:" $COMPLETION_FILE; then
|
||||||
echo "Gogs domain:$GIT_DOMAIN_NAME" >> $COMPLETION_FILE
|
echo "gogs domain:$GIT_DOMAIN_NAME" >> $COMPLETION_FILE
|
||||||
|
else
|
||||||
|
sed -i "s|gogs domain.*|gogs domain:$GIT_DOMAIN_NAME|g" $COMPLETION_FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function_check configure_firewall_for_git
|
function_check configure_firewall_for_git
|
||||||
|
|
Loading…
Reference in New Issue