Skip to content

Commit

Permalink
btrfs-sync: check for existing keys
Browse files Browse the repository at this point in the history
Signed-off-by: nachoparker <[email protected]>
  • Loading branch information
nachoparker committed Jan 18, 2021
1 parent 6cb682a commit 3a3b6a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/ncp/BACKUPS/nc-snapshot-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3a3b6a7

Please sign in to comment.