don't sync continuously, and be verbose
This commit is contained in:
parent
2942b8d472
commit
2c63df3b7f
6
sync.run
6
sync.run
|
@ -36,7 +36,7 @@ $IPFS config --json Experimental.FilestoreEnabled true
|
|||
echo "Synchronizing with the main Ubuntu mirror, stage 1."
|
||||
rsync --recursive --times --links --safe-links --hard-links --stats \
|
||||
--exclude "Packages*" --exclude "Sources*" --exclude "Release*" \
|
||||
--exclude "InRelease" \
|
||||
--exclude "InRelease" -v \
|
||||
rsync://archive.ubuntu.com/ubuntu "$MIRRORDIR"
|
||||
|
||||
echo "Adding the mirror files to IPFS."
|
||||
|
@ -45,7 +45,7 @@ echo "Published IPFS hash ${hash}."
|
|||
|
||||
echo "Synchronizing with the main Ubuntu mirror, stage 2."
|
||||
rsync --recursive --times --links --safe-links --hard-links --stats \
|
||||
--delete --delete-after \
|
||||
--delete --delete-after -v \
|
||||
rsync://archive.ubuntu.com/ubuntu \
|
||||
"$HOME/mirror"
|
||||
|
||||
|
@ -61,4 +61,6 @@ ipns="$($IPFS name publish "${hash}" | cut -d ' ' -f 3 | tr -d ':')"
|
|||
echo "IPFS Mirror synchronized."
|
||||
echo "Add the address 'ipfs:/ipns/${ipns}' to your '/etc/apt/sources.list'."
|
||||
echo "For example, add 'deb ipfs:/ipns/${ipns} xenial main' if you are in Ubuntu 16.04, and you want to use IPFS to get updates from the main archive."
|
||||
|
||||
sleep 3600 # wait 1h before syncing again
|
||||
__EOF__
|
||||
|
|
Loading…
Reference in New Issue