btrfs-sync: check for existing keys

Signed-off-by: nachoparker <nacho@ownyourbits.com>
This commit is contained in:
nachoparker 2021-01-17 16:50:32 -07:00
parent 6cb682abe2
commit 3a3b6a7042

View File

@ -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"