Restore of syncthing users
This commit is contained in:
parent
7ab85b55d2
commit
b72da11f6c
|
@ -336,7 +336,12 @@ function restore_local_syncthing {
|
|||
if [ ! -d /home/$USERNAME/Sync ]; then
|
||||
mkdir /home/$USERNAME/Sync
|
||||
fi
|
||||
cp -r ${temp_restore_dir}/* /home/$USERNAME/Sync/
|
||||
if [ -d /root/Sync ]; then
|
||||
cp -r /root/Sync/* /home/$USERNAME/Sync/
|
||||
rm -rf /root/Sync
|
||||
else
|
||||
cp -r ${temp_restore_dir}/* /home/$USERNAME/Sync/
|
||||
fi
|
||||
fi
|
||||
if [ ! "$?" = "0" ]; then
|
||||
rm -rf ${temp_restore_dir}
|
||||
|
@ -458,7 +463,12 @@ function restore_remote_syncthing {
|
|||
if [ ! -d /home/$USERNAME/Sync ]; then
|
||||
mkdir /home/$USERNAME/Sync
|
||||
fi
|
||||
cp -r $temp_restore_dir/* /home/$USERNAME/Sync/
|
||||
if [ -d /root/Sync ]; then
|
||||
cp -r /root/Sync/* /home/$USERNAME/Sync/
|
||||
rm -rf /root/Sync
|
||||
else
|
||||
cp -r ${temp_restore_dir}/* /home/$USERNAME/Sync/
|
||||
fi
|
||||
fi
|
||||
if [ ! "$?" = "0" ]; then
|
||||
rm -rf $temp_restore_dir
|
||||
|
|
Loading…
Reference in New Issue