mirror of
https://github.com/linuxserver/docker-transmission.git
synced 2025-11-03 10:15:48 +01:00
@@ -10,6 +10,8 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
|
|||||||
RUN \
|
RUN \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
curl \
|
curl \
|
||||||
|
jq \
|
||||||
|
transmission-cli \
|
||||||
transmission-daemon
|
transmission-daemon
|
||||||
|
|
||||||
# copy local files
|
# copy local files
|
||||||
|
|||||||
@@ -81,6 +81,13 @@ this requires 3 settings to be changed in the settings.json file.
|
|||||||
|
|
||||||
Transmission will convert it to a hash when you restart the container after making the above edits.
|
Transmission will convert it to a hash when you restart the container after making the above edits.
|
||||||
|
|
||||||
|
## Updating Blocklists Automatically
|
||||||
|
|
||||||
|
This requires `"blocklist-enabled": true,` to be set. By setting this to true, it is assumed you have also populated `blocklist-url` with a valid block list.
|
||||||
|
|
||||||
|
The automatic update is a shell script that downloads a blocklist from the url stored in the settings.json, gunzips it, and restarts the transmission daemon.
|
||||||
|
|
||||||
|
The automatic update will run once a day at 3am local server time.
|
||||||
|
|
||||||
## Info
|
## Info
|
||||||
|
|
||||||
@@ -97,6 +104,7 @@ Transmission will convert it to a hash when you restart the container after maki
|
|||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
|
+ **16.10.16:** Blocklist autoupdate with optional authentication.
|
||||||
+ **14.10.16:** Add version layer information.
|
+ **14.10.16:** Add version layer information.
|
||||||
+ **23.09.16:** Add information about securing the webui to README..
|
+ **23.09.16:** Add information about securing the webui to README..
|
||||||
+ **21.09.16:** Add curl package.
|
+ **21.09.16:** Add curl package.
|
||||||
|
|||||||
10
root/defaults/blocklist-update.sh
Normal file
10
root/defaults/blocklist-update.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
BLOCKLIST_URL=`jq -r '.["blocklist-url"]' settings.json`
|
||||||
|
|
||||||
|
rm /config/blocklists/*
|
||||||
|
cd /config/blocklists
|
||||||
|
wget -q $BLOCKLIST_URL
|
||||||
|
gunzip *.gz
|
||||||
|
chmod go+r *
|
||||||
|
s6-svc -h /var/run/s6/services/transmission
|
||||||
@@ -8,10 +8,17 @@ mkdir -p \
|
|||||||
[[ ! -f /config/settings.json ]] && cp \
|
[[ ! -f /config/settings.json ]] && cp \
|
||||||
/defaults/settings.json /config/settings.json
|
/defaults/settings.json /config/settings.json
|
||||||
|
|
||||||
|
# copy blocklist-update script
|
||||||
|
[[ ! -f /config/blocklist-update.sh ]] && cp \
|
||||||
|
/defaults/blocklist-update.sh /config/blocklist-update.sh
|
||||||
|
|
||||||
# permissions
|
# permissions
|
||||||
chown abc:abc \
|
chown abc:abc \
|
||||||
/config/settings.json \
|
/config/settings.json \
|
||||||
|
/config/blocklist-update.sh \
|
||||||
/downloads \
|
/downloads \
|
||||||
/downloads/complete \
|
/downloads/complete \
|
||||||
/downloads/incomplete \
|
/downloads/incomplete \
|
||||||
/watch
|
/watch
|
||||||
|
|
||||||
|
chmod 755 /config/blocklist-update.sh
|
||||||
|
|||||||
10
root/etc/crontabs/root
Normal file
10
root/etc/crontabs/root
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# do daily/weekly/monthly maintenance
|
||||||
|
# min hour day month weekday command
|
||||||
|
*/15 * * * * run-parts /etc/periodic/15min
|
||||||
|
0 * * * * run-parts /etc/periodic/hourly
|
||||||
|
0 2 * * * run-parts /etc/periodic/daily
|
||||||
|
0 3 * * 6 run-parts /etc/periodic/weekly
|
||||||
|
0 5 1 * * run-parts /etc/periodic/monthly
|
||||||
|
|
||||||
|
# run daily blocklist update
|
||||||
|
0 3 * * * /config/blocklist-update.sh 2>&1
|
||||||
3
root/etc/services.d/cron/run
Normal file
3
root/etc/services.d/cron/run
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
/usr/sbin/crond -f -S -l 0 -c /etc/crontabs
|
||||||
Reference in New Issue
Block a user