Skip to content

Commit

Permalink
increase memory (#2439)
Browse files Browse the repository at this point in the history
  • Loading branch information
enoch85 authored Feb 6, 2023
1 parent fb8b702 commit 28d0525
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion torrent/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,23 @@ install_if_not transmission-daemon
# Download the VM
curl -fSLO --retry 3 https://download.kafit.se/s/dnkWptz8AK4JZDM/download
mv download NextcloudVM.zip
chown debian-transmission:debian-transmission NextcloudVM.zip

# Set more memory to sysctl
echo "net.core.rmem_max = 16777216" >> /etc/sysctl.conf
echo "net.core.wmem_max = 4194304" >> /etc/sysctl.conf
sysctl -p

# Create torrent
transmission-create -o nextcloudvmhanssonit.torrent -c "https://www.hanssonit.se/nextcloud-vm" "$(for tracker in $(curl_to_dir "$GITHUB_REPO"/torrent trackers.txt /tmp && cat /tmp/trackers.txt); do echo -t "$tracker"; done)" NextcloudVM.zip
trackerslist="$(for tracker in $(curl "$GITHUB_REPO"/torrent/trackers.txt); do echo "-t $tracker"; done)"
transmission-create -o nextcloudvmhanssonit.torrent -c "https://www.hanssonit.se/nextcloud-vm" "$trackerslist" NextcloudVM.zip

# Seed it!
transmission-remote -n 'transmission:transmission' -a nextcloudvmhanssonit.torrent

# Copy it to local NC account
nextclouduser="$(input_box_flow "Please enter the Nextcloud user that you want to move the finished torrent file to:")"
rsync -av nextcloudvmhanssonit.torrent /mnt/ncdata/"$nextclouduser"/files/
chown www-data:www-data /mnt/ncdata/"$nextclouduser"/files/nextcloudvmhanssonit.torrent
nextcloud_occ files:scan "$nextclouduser"
unset nextclouduser

0 comments on commit 28d0525

Please sign in to comment.