keep aria2 control file and use it for labsync-seeder service

This commit is contained in:
Simon Bruder 2018-10-21 13:09:21 +00:00
parent eb38c404bb
commit f223a349da
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
2 changed files with 6 additions and 2 deletions

View file

@ -2,15 +2,15 @@
set -e
cd /tmp
cd /var/lib/labsync
ln -s "$LABSYNC_SQUASHFS_LV" "$LABSYNC_SQUASHFS_FILE"
exec aria2c \
--allow-overwrite \
--check-integrity \
--seed-ratio=0.0 \
--summary-interval=60 \
--file-allocation=none \
--enable-dht=false \
--force-save \
"$LABSYNC_TORRENT"

View file

@ -176,6 +176,7 @@ PARTTABLE
--summary-interval=0 \
--file-allocation=none \
--enable-dht=false \
--force-save \
/tmp/torrent
)
else
@ -201,6 +202,9 @@ PARTTABLE
echo $hostname > ${rootmnt}/etc/hostname
sed "s/@@HOSTNAME@@/$hostname/" ${rootmnt}/etc/hosts.template > ${rootmnt}/etc/hosts
mkdir -p ${rootmnt}/var/lib/labsync
cp /tmp/torrent.aria2 ${rootmnt}/var/lib/labsync
if [ -z "$labsync_localboot" ]; then
labsync_set_environment LABSYNC "$torrent_name"
labsync_set_environment LABSYNC_TORRENT "${labsync_torrent}"