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
81d4fab2
Commit
81d4fab2
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Move remote tox restore to app script
parent
f4d4aeac
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-mumble
+27
-1
27 additions, 1 deletion
src/freedombone-app-mumble
src/freedombone-app-tox
+15
-1
15 additions, 1 deletion
src/freedombone-app-tox
src/freedombone-restore-remote
+0
-57
0 additions, 57 deletions
src/freedombone-restore-remote
with
42 additions
and
59 deletions
src/freedombone-app-mumble
+
27
−
1
View file @
81d4fab2
...
...
@@ -107,7 +107,33 @@ function backup_remote_mumble {
}
function
restore_remote_mumble
{
echo
-n
''
if
[
-d
$SERVER_DIRECTORY
/backup/voip
]
;
then
echo
$"Restoring Mumble settings"
temp_restore_dir
=
/root/tempvoip
function_check restore_directory_from_friend
restore_directory_from_friend
$temp_restore_dir
voip
cp
-f
$temp_restore_dir
/home/
$ADMIN_USERNAME
/tempbackup/mumble-server.ini /etc/
if
[
!
"
$?
"
=
"0"
]
;
then
rm
-rf
$temp_restore_dir
exit
7823
fi
cp
-f
$temp_restore_dir
/home/
$ADMIN_USERNAME
/tempbackup/sipwitch.conf /etc/sipwitch.conf
if
[
!
"
$?
"
=
"0"
]
;
then
rm
-rf
$temp_restore_dir
exit
7823
fi
cp
-f
$temp_restore_dir
/home/
$ADMIN_USERNAME
/tempbackup/mumble-server.sqlite /var/lib/mumble-server/
if
[
!
"
$?
"
=
"0"
]
;
then
rm
-rf
$temp_restore_dir
exit
276
fi
rm
-rf
$temp_restore_dir
cp
/etc/ssl/certs/mumble
*
/var/lib/mumble-server
cp
/etc/ssl/private/mumble
*
/var/lib/mumble-server
chown
-R
mumble-server:mumble-server /var/lib/mumble-server
service mumble-server restart
echo
$"Restore of Mumble complete"
fi
}
function
remove_mumble
{
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-app-tox
+
15
−
1
View file @
81d4fab2
...
...
@@ -117,7 +117,21 @@ function backup_remote_tox {
}
function
restore_remote_tox
{
echo
-n
''
if
[
-d
$SERVER_DIRECTORY
/backup/tox
]
;
then
echo
$"Restoring Tox node settings"
function_check restore_directory_from_friend
restore_directory_from_friend / tox
if
[
!
"
$?
"
=
"0"
]
;
then
exit
93653
fi
cp
/var/lib/tox-bootstrapd/tox-bootstrapd.conf /etc/tox-bootstrapd.conf
systemctl restart tox-bootstrapd.service
if
[
!
"
$?
"
=
"0"
]
;
then
systemctl status tox-bootstrapd.service
exit
59369
fi
echo
$"Restore of Tox node complete"
fi
}
function
remove_tox_node
{
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-restore-remote
+
0
−
57
View file @
81d4fab2
...
...
@@ -666,61 +666,6 @@ function restore_mailing_list {
fi
}
function
restore_voip
{
if
[[
$RESTORE_APP
!=
'all'
]]
;
then
if
[[
$RESTORE_APP
!=
'voip'
]]
;
then
return
fi
fi
if
[
-d
$SERVER_DIRECTORY
/backup/voip
]
;
then
echo
$"Restoring VoIP settings"
temp_restore_dir
=
/root/tempvoip
restore_directory_from_friend
$temp_restore_dir
voip
cp
-f
$temp_restore_dir
/home/
$ADMIN_USERNAME
/tempbackup/mumble-server.ini /etc/
if
[
!
"
$?
"
=
"0"
]
;
then
rm
-rf
$temp_restore_dir
exit
7823
fi
cp
-f
$temp_restore_dir
/home/
$ADMIN_USERNAME
/tempbackup/sipwitch.conf /etc/sipwitch.conf
if
[
!
"
$?
"
=
"0"
]
;
then
rm
-rf
$temp_restore_dir
exit
7823
fi
cp
-f
$temp_restore_dir
/home/
$ADMIN_USERNAME
/tempbackup/mumble-server.sqlite /var/lib/mumble-server/
if
[
!
"
$?
"
=
"0"
]
;
then
rm
-rf
$temp_restore_dir
exit
276
fi
rm
-rf
$temp_restore_dir
cp
/etc/ssl/certs/mumble
*
/var/lib/mumble-server
cp
/etc/ssl/private/mumble
*
/var/lib/mumble-server
chown
-R
mumble-server:mumble-server /var/lib/mumble-server
service sipwitch restart
service mumble-server restart
fi
}
function
restore_tox
{
if
[[
$RESTORE_APP
!=
'all'
]]
;
then
if
[[
$RESTORE_APP
!=
'tox'
]]
;
then
return
fi
fi
if
[
-d
$SERVER_DIRECTORY
/backup/tox
]
;
then
echo
$"Restoring Tox node settings"
restore_directory_from_friend / tox
if
[
!
"
$?
"
=
"0"
]
;
then
exit
93653
fi
cp
/var/lib/tox-bootstrapd/tox-bootstrapd.conf /etc/tox-bootstrapd.conf
systemctl restart tox-bootstrapd.service
if
[
!
"
$?
"
=
"0"
]
;
then
systemctl status tox-bootstrapd.service
exit
59369
fi
fi
}
function
restore_email
{
if
[[
$RESTORE_APP
!=
'all'
]]
;
then
if
[[
$RESTORE_APP
!=
'email'
]]
;
then
...
...
@@ -794,8 +739,6 @@ restore_mailing_list
restore_email
#restore_apps remote
restore_voip
restore_tox
restore_dlna
echo
$"*** Remote restore was successful ***"
...
...
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