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
1b3b0094
Commit
1b3b0094
authored
9 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Restoring from remote server
parent
7f1a795e
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-controlpanel
+31
-2
31 additions, 2 deletions
src/freedombone-controlpanel
with
31 additions
and
2 deletions
src/freedombone-controlpanel
+
31
−
2
View file @
1b3b0094
...
...
@@ -31,6 +31,7 @@
COMPLETION_FILE
=
$HOME
/freedombone-completed.txt
SELECTED_USERNAME
=
SIP_CONFIG_FILE
=
/etc/sipwitch.conf
ADMIN_USER
=
function
any_key
{
echo
' '
...
...
@@ -143,7 +144,6 @@ function configure_remote_backups {
--msgbox
"No Administrator user found. Check
$COMPLETION_FILE
"
6 40
return
fi
ADMIN_USER
=
$(
cat
$COMPLETION_FILE
|
grep
"Admin user"
|
awk
-F
':'
'{print $2}'
)
if
[
${#
ADMIN
}
-lt
2
]
;
then
dialog
--title
"Administrator user"
\
--msgbox
"Username not found"
6 40
...
...
@@ -438,7 +438,35 @@ function restore_data {
}
function
restore_data_remote
{
any_key
if
[
!
$ADMIN_USER
]
;
then
dialog
--title
"Restore data from remote server"
\
--msgbox
"Unknown admin user"
6 40
return
fi
data
=
$(
tempfile 2>/dev/null
)
trap
"rm -f
$data
"
0 1 2 5 15
dialog
--title
"Restore from remote server"
\
--backtitle
"Freedombone Control Panel"
\
--inputbox
"Enter the domain name of the server from which you wish to restore"
8 60 2>
$data
sel
=
$?
case
$sel
in
0
)
friend_server_domain_name
=
$(
<
$data
)
if
[
${#
friend_server_domain_name
}
-lt
2
]
;
then
return
fi
if
[[
$friend_server_domain_name
!=
*
"."
*
]]
;
then
dialog
--title
"Remote server domain name"
\
--msgbox
"Invalid domain name"
6 40
return
fi
restorefromfriend
$friend_server_domain_name
any_key
;;
esac
}
function
logging_on_off
{
...
...
@@ -648,6 +676,7 @@ if [ ! -f $COMPLETION_FILE ]; then
exit
1
fi
ADMIN_USER
=
$(
cat
$COMPLETION_FILE
|
grep
"Admin user"
|
awk
-F
':'
'{print $2}'
)
menu_top_level
clear
cat
/etc/motd
...
...
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