Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2021-01-18 02:50:32 +0300
committernachoparker <nacho@ownyourbits.com>2021-01-18 06:11:09 +0300
commit3a3b6a7042b78a7d48cd139ac0f2e1420666a8b2 (patch)
tree4b897a5d09795edd2425857e08a88c818531db15
parent6cb682abe278289f096942cd43630b132123dba5 (diff)
btrfs-sync: check for existing keysv1.34.4
Signed-off-by: nachoparker <nacho@ownyourbits.com>
-rw-r--r--bin/ncp/BACKUPS/nc-snapshot-sync.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ncp/BACKUPS/nc-snapshot-sync.sh b/bin/ncp/BACKUPS/nc-snapshot-sync.sh
index 79a11d8a..2f965bd4 100644
--- a/bin/ncp/BACKUPS/nc-snapshot-sync.sh
+++ b/bin/ncp/BACKUPS/nc-snapshot-sync.sh
@@ -15,12 +15,12 @@ install()
apt-get install -y --no-install-recommends pv openssh-client
wget https://raw.githubusercontent.com/nachoparker/btrfs-sync/master/btrfs-sync -O /usr/local/bin/btrfs-sync
chmod +x /usr/local/bin/btrfs-sync
- ssh-keygen -N "" -f /root/.ssh/id_rsa
+ if ! [[ -f /root/.ssh/id_rsa ]]; then ssh-keygen -N "" -f /root/.ssh/id_rsa; fi
}
configure()
{
- [[ $ACTIVE != "yes" ]] && {
+ [[ $ACTIVE != "yes" ]] && {
rm -f /etc/cron.d/ncp-snapsync-auto
service cron restart
echo "snapshot sync disabled"