Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
b87a325f
Commit
b87a325f
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
lower case
parent
fd31df50
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-gogs
+11
-9
11 additions, 9 deletions
src/freedombone-app-gogs
with
11 additions
and
9 deletions
src/freedombone-app-gogs
+
11
−
9
View file @
b87a325f
...
...
@@ -234,7 +234,7 @@ function upgrade_gogs {
}
function
backup_local_gogs
{
if
!
grep
-q
"
G
ogs domain"
$COMPLETION_FILE
;
then
if
!
grep
-q
"
g
ogs domain"
$COMPLETION_FILE
;
then
return
fi
...
...
@@ -242,7 +242,7 @@ function backup_local_gogs {
return
fi
GIT_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"
G
ogs domain"
|
awk
-F
':'
'{print $2}'
)
GIT_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"
g
ogs domain"
|
awk
-F
':'
'{print $2}'
)
echo
$"Backing up gogs"
...
...
@@ -258,14 +258,14 @@ function backup_local_gogs {
}
function
restore_local_gogs
{
if
!
grep
-q
"
G
ogs domain"
$COMPLETION_FILE
;
then
if
!
grep
-q
"
g
ogs domain"
$COMPLETION_FILE
;
then
return
fi
if
[
!
-d
/home/
$GOGS_USERNAME
/gogs-repositories
]
;
then
return
fi
GIT_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"
G
ogs domain"
|
awk
-F
':'
'{print $2}'
)
GIT_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"
g
ogs 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
"
G
ogs domain"
|
awk
-F
':'
'{print $2}'
)
GIT_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"
g
ogs 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
"
G
ogs domain"
$COMPLETION_FILE
;
then
GIT_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"
G
ogs domain"
|
awk
-F
':'
'{print $2}'
)
if
grep
-q
"
g
ogs domain"
$COMPLETION_FILE
;
then
GIT_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"
g
ogs 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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment