|
@@ -251,9 +251,9 @@ function upgrade_syncthing {
|
251
|
251
|
}
|
252
|
252
|
|
253
|
253
|
function backup_local_syncthing {
|
254
|
|
- if [ -d /var/lib/syncthing/SyncShared ]; then
|
|
254
|
+ if [ -d $SYNCTHING_SHARED_DATA ]; then
|
255
|
255
|
function_check backup_directory_to_usb
|
256
|
|
- backup_directory_to_usb /var/lib/syncthing/SyncShared syncthingshared
|
|
256
|
+ backup_directory_to_usb $SYNCTHING_SHARED_DATA syncthingshared
|
257
|
257
|
backup_directory_to_usb /root/.config/syncthing syncthingconfig
|
258
|
258
|
fi
|
259
|
259
|
|
|
@@ -314,10 +314,10 @@ function restore_local_syncthing {
|
314
|
314
|
restore_directory_from_usb ${temp_restore_dir}shared syncthingshared
|
315
|
315
|
#cp -r ${temp_restore_dir}shared/* /
|
316
|
316
|
|
317
|
|
- if [ ! -d /var/lib/syncthing/SyncShared ]; then
|
318
|
|
- mkdir -p /var/lib/syncthing/SyncShared
|
|
317
|
+ if [ ! -d $SYNCTHING_SHARED_DATA ]; then
|
|
318
|
+ mkdir -p $SYNCTHING_SHARED_DATA
|
319
|
319
|
fi
|
320
|
|
- cp -r ${temp_restore_dir}shared/* /var/lib/syncthing/SyncShared/
|
|
320
|
+ cp -r ${temp_restore_dir}shared/* $SYNCTHING_SHARED_DATA/
|
321
|
321
|
|
322
|
322
|
if [ ! "$?" = "0" ]; then
|
323
|
323
|
set_user_permissions
|
|
@@ -379,10 +379,10 @@ function backup_remote_syncthing {
|
379
|
379
|
backup_directory_to_friend /root/.config/syncthing syncthingconfig
|
380
|
380
|
echo $"Backup of syncthing configuration complete"
|
381
|
381
|
fi
|
382
|
|
- if [ -d /var/lib/syncthing/SyncShared ]; then
|
|
382
|
+ if [ -d $SYNCTHING_SHARED_DATA ]; then
|
383
|
383
|
echo $"Backing up syncthing shared files"
|
384
|
384
|
function_check backup_directory_to_friend
|
385
|
|
- backup_directory_to_friend /var/lib/syncthing/SyncShared syncthingshared
|
|
385
|
+ backup_directory_to_friend $SYNCTHING_SHARED_DATA syncthingshared
|
386
|
386
|
echo $"Backup of syncthing shared files complete"
|
387
|
387
|
fi
|
388
|
388
|
|
|
@@ -440,10 +440,10 @@ function restore_remote_syncthing {
|
440
|
440
|
function_check restore_directory_from_friend
|
441
|
441
|
restore_directory_from_friend $temp_restore_dir syncthingshared
|
442
|
442
|
#cp -r $temp_restore_dir/* /
|
443
|
|
- if [ ! -d /var/lib/syncthing/SyncShared ]; then
|
444
|
|
- mkdir -p /var/lib/syncthing/SyncShared
|
|
443
|
+ if [ ! -d $SYNCTHING_SHARED_DATA ]; then
|
|
444
|
+ mkdir -p $SYNCTHING_SHARED_DATA
|
445
|
445
|
fi
|
446
|
|
- cp -r ${temp_restore_dir}shared/* /var/lib/syncthing/SyncShared/
|
|
446
|
+ cp -r ${temp_restore_dir}shared/* $SYNCTHING_SHARED_DATA/
|
447
|
447
|
if [ ! "$?" = "0" ]; then
|
448
|
448
|
systemctl start syncthing
|
449
|
449
|
systemctl start cron
|