Move remote ipfs backup to app script

This commit is contained in:
Bob Mottram 2016-07-09 21:38:19 +01:00
parent c2f56cd1ec
commit cecce33265
2 changed files with 10 additions and 10 deletions

View File

@ -35,7 +35,7 @@ IPFS_COMMIT='20b06a4cbce8884f5b194da6e98cb11f2c77f166'
IPFS_PORT=4001
function reconfigure_ipfs {
echo -n ''
echo -n ''
}
function upgrade_ipfs {
@ -92,7 +92,15 @@ function restore_local_ipfs {
}
function backup_remote_ipfs {
echo -n ''
if ! grep -q "Admin user" $COMPLETION_FILE; then
return
fi
ADMIN_USERNAME=$(cat $COMPLETION_FILE | grep "Admin user" | awk -F ':' '{print $2}')
if [ -d /home/$ADMIN_USERNAME/.ipfs ]; then
echo $"Backing up IPFS"
backup_directory_to_friend /home/$ADMIN_USERNAME/.ipfs ipfs
echo $"Backup of IPFS complete"
fi
}
function restore_remote_ipfs {

View File

@ -276,13 +276,6 @@ function backup_admin_readme {
fi
}
function backup_ipfs {
if [ -d /home/$ADMIN_USERNAME/.ipfs ]; then
echo $"Backing up IPFS"
backup_directory_to_friend /home/$ADMIN_USERNAME/.ipfs ipfs
fi
}
function backup_dlna {
if [ -d /var/cache/minidlna ]; then
echo $"Backing up DLNA cache"
@ -463,7 +456,6 @@ if [[ $TEST_MODE == "no" ]]; then
backup_certs
backup_mailing_list
backup_ipfs
backup_dlna
backup_voip
backup_tox