Skip to content
Snippets Groups Projects
Commit cecce332 authored by Bob Mottram's avatar Bob Mottram
Browse files

Move remote ipfs backup to app script

parent c2f56cd1
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment