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
5f8e95a0
Commit
5f8e95a0
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Use head to avoid possible other entries
parent
daa92141
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-gnusocial
+5
-5
5 additions, 5 deletions
src/freedombone-app-gnusocial
with
5 additions
and
5 deletions
src/freedombone-app-gnusocial
+
5
−
5
View file @
5f8e95a0
...
...
@@ -238,7 +238,7 @@ function upgrade_gnusocial {
function
backup_local_gnusocial
{
MICROBLOG_DOMAIN_NAME
=
'microblog'
if
grep
-q
"GNU Social domain"
$COMPLETION_FILE
;
then
MICROBLOG_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"GNU Social domain"
|
awk
-F
':'
'{print $2}'
)
MICROBLOG_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"GNU Social domain"
|
head
-n
1 |
awk
-F
':'
'{print $2}'
)
fi
source_directory
=
/var/www/
${
MICROBLOG_DOMAIN_NAME
}
/htdocs
...
...
@@ -266,7 +266,7 @@ function restore_local_gnusocial {
if
!
grep
-q
"GNU Social domain"
$COMPLETION_FILE
;
then
return
fi
MICROBLOG_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"GNU Social domain"
|
awk
-F
':'
'{print $2}'
)
MICROBLOG_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"GNU Social domain"
|
head
-n
1 |
awk
-F
':'
'{print $2}'
)
if
[
$MICROBLOG_DOMAIN_NAME
]
;
then
echo
$"Restoring GNU Social"
temp_restore_dir
=
/root/tempgnusocial
...
...
@@ -292,7 +292,7 @@ function restore_local_gnusocial {
function
backup_remote_gnusocial
{
if
grep
-q
"GNU Social domain"
$COMPLETION_FILE
;
then
MICROBLOG_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"GNU Social domain"
|
awk
-F
':'
'{print $2}'
)
MICROBLOG_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"GNU Social domain"
|
head
-n
1 |
awk
-F
':'
'{print $2}'
)
temp_backup_dir
=
/var/www/
${
MICROBLOG_DOMAIN_NAME
}
/htdocs
if
[
-d
$temp_backup_dir
]
;
then
function_check suspend_site
...
...
@@ -317,7 +317,7 @@ function backup_remote_gnusocial {
function
restore_remote_gnusocial
{
if
grep
-q
"GNU Social domain"
$COMPLETION_FILE
;
then
echo
$"Restoring GNU Social"
MICROBLOG_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"GNU Social domain"
|
awk
-F
':'
'{print $2}'
)
MICROBLOG_DOMAIN_NAME
=
$(
cat
$COMPLETION_FILE
|
grep
"GNU Social domain"
|
head
-n
1 |
awk
-F
':'
'{print $2}'
)
# stop the daemons
cd
/var/www/
${
MICROBLOG_DOMAIN_NAME
}
/htdocs
...
...
@@ -344,7 +344,7 @@ function remove_gnusocial {
return
fi
if
grep
-q
"MICROBLOG_DOMAIN_NAME"
$CONFIGURATION_FILE
;
then
MICROBLOG_DOMAIN_NAME
=
$(
grep
"MICROBLOG_DOMAIN_NAME"
$CONFIGURATION_FILE
|
awk
-F
'='
'{print $2}'
)
MICROBLOG_DOMAIN_NAME
=
$(
grep
"MICROBLOG_DOMAIN_NAME"
$CONFIGURATION_FILE
|
head
-n
1 |
awk
-F
'='
'{print $2}'
)
fi
if
grep
-q
"MY_USERNAME"
$CONFIGURATION_FILE
;
then
MY_USERNAME
=
$(
grep
"MY_USERNAME"
$CONFIGURATION_FILE
|
awk
-F
'='
'{print $2}'
)
...
...
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