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
3910ab6a
Commit
3910ab6a
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Move local cjdns restore to app script
parent
bda2f991
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/freedombone-app-cjdns
+25
-2
25 additions, 2 deletions
src/freedombone-app-cjdns
src/freedombone-app-dlna
+26
-1
26 additions, 1 deletion
src/freedombone-app-dlna
src/freedombone-restore-local
+1
-45
1 addition, 45 deletions
src/freedombone-restore-local
with
52 additions
and
48 deletions
src/freedombone-app-cjdns
+
25
−
2
View file @
3910ab6a
...
...
@@ -117,11 +117,34 @@ function get_cjdns_password {
}
function
backup_local_cjdns
{
echo
''
echo
-n
''
}
function
restore_local_cjdns
{
if
[
-d
$USB_MOUNT
/backup/cjdns
]
;
then
echo
$"Restoring cjdns installation"
temp_restore_dir
=
/root/tempcjdns
function_check restore_directory_from_usb
restore_directory_from_usb
$temp_restore_dir
cjdns
rm
-rf
/etc/cjdns
cp
-r
$temp_restore_dir
/etc/cjdns /etc/
if
[
!
"
$?
"
=
"0"
]
;
then
function_check set_user_permissions
set_user_permissions
function_check backup_unmount_drive
backup_unmount_drive
exit
8472
fi
rm
-rf
$temp_restore_dir
fi
}
function
backup_remote_cjdns
{
echo
''
echo
-n
''
}
function
restore_remote_cjdns
{
echo
-n
''
}
function
remove_cjdns
{
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-app-dlna
+
26
−
1
View file @
3910ab6a
...
...
@@ -65,8 +65,33 @@ function backup_local_dlna {
fi
}
function
restore_local_dlna
{
if
[
-d
/var/cache/minidlna
]
;
then
if
[
-d
$USB_MOUNT
/backup/dlna
]
;
then
echo
$"Restoring DLNA cache"
temp_restore_dir
=
/root/tempdlna
function_check restore_directory_from_usb
restore_directory_from_usb
$temp_restore_dir
dlna
cp
-r
$temp_restore_dir
/var/cache/minidlna/
*
/var/cache/minidlna/
if
[
!
"
$?
"
=
"0"
]
;
then
rm
-rf
$temp_restore_dir
function_check set_user_permissions
set_user_permissions
function_check backup_unmount_drive
backup_unmount_drive
exit
982572
fi
rm
-rf
$temp_restore_dir
fi
fi
}
function
backup_remote_dlna
{
echo
''
echo
-n
''
}
function
restore_remote_dlna
{
echo
-n
''
}
function
remove_dlna
{
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-restore-local
+
1
−
45
View file @
3910ab6a
...
...
@@ -1113,26 +1113,6 @@ function restore_blog {
fi
}
function
restore_cjdns
{
if
[[
$RESTORE_APP
!=
'all'
]]
;
then
if
[[
$RESTORE_APP
!=
'cjdns'
]]
;
then
return
fi
fi
if
[
-d
$USB_MOUNT
/backup/cjdns
]
;
then
echo
$"Restoring cjdns installation"
restore_directory_from_usb /root/tempcjdns cjdns
rm
-rf
/etc/cjdns
cp
-r
/root/tempcjdns/etc/cjdns /etc/
if
[
!
"
$?
"
=
"0"
]
;
then
set_user_permissions
backup_unmount_drive
exit
8472
fi
rm
-rf
/root/tempcjdns
fi
}
function
restore_email
{
if
[[
$RESTORE_APP
!=
'all'
]]
;
then
if
[[
$RESTORE_APP
!=
'email'
]]
;
then
...
...
@@ -1163,28 +1143,6 @@ function restore_email {
fi
}
function
restore_dlna
{
if
[[
$RESTORE_APP
!=
'all'
]]
;
then
if
[[
$RESTORE_APP
!=
'dlna'
]]
;
then
return
fi
fi
if
[
-d
/var/cache/minidlna
]
;
then
if
[
-d
$USB_MOUNT
/backup/dlna
]
;
then
echo
$"Restoring DLNA cache"
restore_directory_from_usb /root/tempdlna dlna
cp
-r
/root/tempdlna/var/cache/minidlna/
*
/var/cache/minidlna/
if
[
!
"
$?
"
=
"0"
]
;
then
rm
-rf
/root/tempdlna
set_user_permissions
backup_unmount_drive
exit
982
fi
rm
-rf
/root/tempdlna
fi
fi
}
function
get_restore_app
{
if
[
${
1
}
]
;
then
if
[
!
-d
/home/
${
1
}
]
;
then
...
...
@@ -1252,10 +1210,8 @@ restore_mediagoblin
restore_gogs
restore_wiki
restore_blog
restore_cjdns
restore_email
restore_dlna
restore_email
restore_apps
set_user_permissions
backup_unmount_drive
...
...
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