Selectively restore applications from a remote server
This commit is contained in:
parent
0467fb24f8
commit
a15651a837
|
@ -556,6 +556,83 @@ function restore_from_usb {
|
|||
any_key
|
||||
}
|
||||
|
||||
function restore_from_remote {
|
||||
remote_domain_name=$1
|
||||
|
||||
while true
|
||||
do
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle $"Freedombone Control Panel" \
|
||||
--title $"Restore from ${remote_domain_name}" \
|
||||
--radiolist $"Choose an application to restore:" 30 70 27 \
|
||||
1 $"Everything" on \
|
||||
2 $"Return to the backup and restore menu" off \
|
||||
3 $"Configuration files" off \
|
||||
4 $"MariaDB settings" off \
|
||||
5 $"Let's Encrypt account" off \
|
||||
6 $"Mutt email client settings" off \
|
||||
7 $"GPG keys" off \
|
||||
8 $"Email processing rules" off \
|
||||
9 $"Spam filtering rules" off \
|
||||
10 $"Administrator's README file" off \
|
||||
11 $"IPFS" off \
|
||||
12 $"SSH keys" off \
|
||||
13 $"User configuration files" off \
|
||||
14 $"SSL/TLS certificates" off \
|
||||
15 $"Personal settings" off \
|
||||
16 $"Mailing List" off \
|
||||
17 $"XMPP chat" off \
|
||||
18 $"GNU Social" off \
|
||||
19 $"Hubzilla" off \
|
||||
20 $"Owncloud" off \
|
||||
21 $"Gogs" off \
|
||||
22 $"Wiki" off \
|
||||
23 $"Blog" off \
|
||||
24 $"CJDNS" off \
|
||||
25 $"Email" off \
|
||||
26 $"DLNA" off \
|
||||
27 $"VoIP" off \
|
||||
28 $"Tox" off 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) break;;
|
||||
255) break;;
|
||||
esac
|
||||
case $(cat $data) in
|
||||
1) ${PROJECT_NAME}-restore-remote $remote_domain_name;;
|
||||
2) return;;
|
||||
3) ${PROJECT_NAME}-restore-remote $remote_domain_name configuration;;
|
||||
4) ${PROJECT_NAME}-restore-remote $remote_domain_name mariadb;;
|
||||
5) ${PROJECT_NAME}-restore-remote $remote_domain_name letsencrypt;;
|
||||
6) ${PROJECT_NAME}-restore-remote $remote_domain_name mutt;;
|
||||
7) ${PROJECT_NAME}-restore-remote $remote_domain_name gpg;;
|
||||
8) ${PROJECT_NAME}-restore-remote $remote_domain_name procmail;;
|
||||
9) ${PROJECT_NAME}-restore-remote $remote_domain_name spamassassin;;
|
||||
10) ${PROJECT_NAME}-restore-remote $remote_domain_name readme;;
|
||||
11) ${PROJECT_NAME}-restore-remote $remote_domain_name ipfs;;
|
||||
12) ${PROJECT_NAME}-restore-remote $remote_domain_name ssh;;
|
||||
13) ${PROJECT_NAME}-restore-remote $remote_domain_name userconfig;;
|
||||
14) ${PROJECT_NAME}-restore-remote $remote_domain_name certs;;
|
||||
15) ${PROJECT_NAME}-restore-remote $remote_domain_name personal;;
|
||||
16) ${PROJECT_NAME}-restore-remote $remote_domain_name mailinglist;;
|
||||
17) ${PROJECT_NAME}-restore-remote $remote_domain_name xmpp;;
|
||||
18) ${PROJECT_NAME}-restore-remote $remote_domain_name gnusocial;;
|
||||
19) ${PROJECT_NAME}-restore-remote $remote_domain_name hubzilla;;
|
||||
20) ${PROJECT_NAME}-restore-remote $remote_domain_name owncloud;;
|
||||
21) ${PROJECT_NAME}-restore-remote $remote_domain_name gogs;;
|
||||
22) ${PROJECT_NAME}-restore-remote $remote_domain_name wiki;;
|
||||
23) ${PROJECT_NAME}-restore-remote $remote_domain_name blog;;
|
||||
24) ${PROJECT_NAME}-restore-remote $remote_domain_name cjdns;;
|
||||
25) ${PROJECT_NAME}-restore-remote $remote_domain_name email;;
|
||||
26) ${PROJECT_NAME}-restore-remote $remote_domain_name dlna;;
|
||||
27) ${PROJECT_NAME}-restore-remote $remote_domain_name voip;;
|
||||
28) ${PROJECT_NAME}-restore-remote $remote_domain_name tox;;
|
||||
esac
|
||||
done
|
||||
any_key
|
||||
}
|
||||
|
||||
function restore_data {
|
||||
dialog --title $"Restore data from USB" \
|
||||
--msgbox $"Plug in your backup USB drive" 6 40
|
||||
|
@ -591,8 +668,7 @@ function restore_data_remote {
|
|||
return
|
||||
fi
|
||||
|
||||
${PROJECT_NAME}-restore-remote $friend_server_domain_name
|
||||
any_key
|
||||
restore_from_remote $friend_server_domain_name
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue