77# ########
88
99# # This script will install Transmission, download the latest version of the VM, create a torrent of the file and seed it using Transmission
10- # # Help is welcome!
10+ # # Improvments to the script are welcome!
1111
1212# shellcheck source=lib.sh
1313# shellcheck disable=SC2046
14- source /var/scripts/fetch_lib.sh || source <( curl -sL https://raw.githubusercontent.com/nextcloud/vm/main/lib.sh)
1514
1615# Check for errors + debug code and abort if something isn't right
1716# 1 = ON
@@ -27,20 +26,21 @@ install_if_not transmission-cli
2726install_if_not transmission-daemon
2827
2928TRANSMISSION_DL_DIR=" /var/lib/transmission-daemon/downloads"
30- NC_ZIP=" NextcloudVM.zip"
29+ NC_OVA=" 100GB_Nextcloud-VM_www.hanssonit.se.ova"
30+ VERSION_TAG=30.0.1
31+ VERSION_HUB=9
3132
3233# Modify transmission service file to fix https://github.com/transmission/transmission/issues/6991
33- sed -i ' s/ Type=notify/ Type=simple/ ' /etc/systemd/system/multi-user.target.wants/transmission-daemon.service
34+ sed -i " s| Type=notify| Type=simple|g " /etc/systemd/system/multi-user.target.wants/transmission-daemon.service
3435systemctl daemon-reload
3536
3637# Check if NextcloudVM.zip already exists
37- if [ ! -f " $TRANSMISSION_DL_DIR " /" $NC_ZIP " ]
38+ if [ ! -f " $TRANSMISSION_DL_DIR " /" $NC_OVA " ]
3839then
3940 # Download the VM only if it doesn't exist
40- curl_to_dir https://download.kafit.se/s/dnkWptz8AK4JZDM download " $TRANSMISSION_DL_DIR "
41- mv " $TRANSMISSION_DL_DIR " /download " $TRANSMISSION_DL_DIR " /" $NC_ZIP "
41+ curl_to_dir " https://download.kafit.se/public.php/dav/files/dnkWptz8AK4JZDM/$VERSION_TAG %20-%20HUB%20$VERSION_HUB " " $NC_OVA " " $TRANSMISSION_DL_DIR "
4242else
43- echo " $NC_ZIP already exists in transmission default downloads directory, skipping download"
43+ echo " $NC_OVA already exists in transmission default downloads directory, skipping download"
4444fi
4545
4646# Set more memory to sysctl
5050
5151# Create torrent
5252curl_to_dir " $GITHUB_REPO " /torrent trackers.txt /tmp
53- transmission-create -o $TRANSMISSION_DL_DIR /nextcloudvmhanssonit.torrent -c " https://www.hanssonit.se/nextcloud-vm" -t " $( cat /tmp/trackers.txt) " " $TRANSMISSION_DL_DIR " /" $NC_ZIP "
53+ transmission-create -o $TRANSMISSION_DL_DIR /nextcloudvmhanssonit.torrent -c " https://www.hanssonit.se/nextcloud-vm" -t $( cat /tmp/trackers.txt) " $TRANSMISSION_DL_DIR " /" $NC_OVA "
5454
5555# Seed it!
5656transmission-remote -n ' transmission:transmission' --torrent=" $TRANSMISSION_DL_DIR /nextcloudvmhanssonit.torrent" -a " $TRANSMISSION_DL_DIR /nextcloudvmhanssonit.torrent" --start --verify
0 commit comments