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
58d1b6e1
Commit
58d1b6e1
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Restoring blog directory
parent
a3ebf299
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-htmly
+20
-14
20 additions, 14 deletions
src/freedombone-app-htmly
with
20 additions
and
14 deletions
src/freedombone-app-htmly
+
20
−
14
View file @
58d1b6e1
...
...
@@ -42,14 +42,14 @@ HTMLY_TITLE="My Htmly"
HTMLY_SUBTITLE
=
"Another
${
PROJECT_NAME
}
Htmly"
htmly_variables
=(
HTMLY_REPO
HTMLY_COMMIT
HTMLY_DOMAIN_NAME
HTMLY_CODE
HTMLY_TITLE
HTMLY_SUBTITLE
ONION_ONLY
DDNS_PROVIDER
MY_USERNAME
)
HTMLY_COMMIT
HTMLY_DOMAIN_NAME
HTMLY_CODE
HTMLY_TITLE
HTMLY_SUBTITLE
ONION_ONLY
DDNS_PROVIDER
MY_USERNAME
)
function
set_avatar_from_url
{
AVATAR
=
"
$1
"
...
...
@@ -228,14 +228,17 @@ function restore_local_htmly {
temp_restore_dir
=
/root/temphtmly
restore_directory_from_usb
$temp_restore_dir
blog
restore_directory_from_usb
$temp_restore_dir
htmly
rm
-rf
/var/www/
${
HTMLY_DOMAIN_NAME
}
/htdocs
cp
-r
$temp_restore_dir
/var/www/
${
HTMLY_DOMAIN_NAME
}
/htdocs /var/www/
${
HTMLY_DOMAIN_NAME
}
/
if
[
-d
/var/www/
${
HTMLY_DOMAIN_NAME
}
/htdocs
]
;
then
rm
-rf
/var/www/
${
HTMLY_DOMAIN_NAME
}
/htdocs
fi
temp_source_dir
=
$(
find
${
temp_restore_dir
}
-name
htdocs |
sed
's/\.//g'
)
cp
-r
${
temp_restore_dir
}${
temp_source_dir
}
/var/www/
${
HTMLY_DOMAIN_NAME
}
/
if
[
!
"
$?
"
=
"0"
]
;
then
set_user_permissions
backup_unmount_drive
exit
593
fi
rm
-rf
$temp_restore_dir
rm
-rf
$
{
temp_restore_dir
}
if
[
!
-d
/var/www/
${
HTMLY_DOMAIN_NAME
}
/htdocs/content
]
;
then
echo
$"No content directory found after restoring htmly"
set_user_permissions
...
...
@@ -285,12 +288,15 @@ function restore_remote_htmly {
mkdir
$temp_restore_dir
function_check restore_directory_from_friend
restore_directory_from_friend
$temp_restore_dir
htmly
rm
-rf
/var/www/
${
HTMLY_DOMAIN_NAME
}
/htdocs
cp
-r
$temp_restore_dir
/var/www/
${
HTMLY_DOMAIN_NAME
}
/htdocs /var/www/
${
HTMLY_DOMAIN_NAME
}
/
if
[
-d
/var/www/
${
HTMLY_DOMAIN_NAME
}
/htdocs
]
;
then
rm
-rf
/var/www/
${
HTMLY_DOMAIN_NAME
}
/htdocs
fi
temp_source_dir
=
$(
find
${
temp_restore_dir
}
-name
htdocs |
sed
's/\.//g'
)
cp
-r
${
temp_restore_dir
}${
temp_source_dir
}
/var/www/
${
HTMLY_DOMAIN_NAME
}
/
if
[
!
"
$?
"
=
"0"
]
;
then
exit
593
fi
rm
-rf
$temp_restore_dir
rm
-rf
$
{
temp_restore_dir
}
if
[
!
-d
/var/www/
${
HTMLY_DOMAIN_NAME
}
/htdocs/content
]
;
then
echo
$"No content directory found after restoring htmly"
exit
287
...
...
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