Files
docker-transmission/root/defaults/blocklist-update.sh

20 lines
461 B
Bash
Raw Normal View History

2016-10-18 08:41:49 -04:00
#!/usr/bin/with-contenv bash
2016-11-02 09:38:19 -04:00
BLOCKLIST_ENABLED=`jq -r '.["blocklist-enabled"]' settings.json`
BLOCKLIST_URL=`jq -r '.["blocklist-url"]' settings.json`
2016-10-18 08:41:49 -04:00
2016-11-02 09:38:19 -04:00
if [ $BLOCKLIST_URL == true ]; then
mkdir -p /tmp/blocklist
cd /tmp/blocklist
wget -q $BLOCKLIST_URL
if [ $? == 0 ]; then
gunzip *.gz
if [ $? == 0 ]; then
chmod go+r *
rm /config/blocklists/*
cp /tmp/blocklists/* /config/blocklists
s6-svc -h /var/run/s6/services/transmission
fi
fi
fi