Skip to content
Snippets Groups Projects
Commit 72eeb2d9 authored by Bob Mottram's avatar Bob Mottram
Browse files

Remove any existing files when creating a mirror

parent fb43680c
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,10 @@ function rsync_setting_remote {
systemctl restart rsync
fi
# remove any existing files
rm -rf "${RSYNC_DATA:?}"/*
# create a daily sync
if [[ "${rsync_hostname}" == *'.onion' ]]; then
{ echo '#!/bin/bash';
echo "cd $RSYNC_DATA || exit 1";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment