working script from container

This commit is contained in:
Paul Hendryx
2016-11-02 09:39:55 -04:00
parent a1b5353ea2
commit 72c8df500e

View File

@@ -3,15 +3,16 @@
BLOCKLIST_ENABLED=`jq -r '.["blocklist-enabled"]' settings.json` BLOCKLIST_ENABLED=`jq -r '.["blocklist-enabled"]' settings.json`
BLOCKLIST_URL=`jq -r '.["blocklist-url"]' settings.json` BLOCKLIST_URL=`jq -r '.["blocklist-url"]' settings.json`
if [ $BLOCKLIST_URL == true ]; then if [ $BLOCKLIST_ENABLED == true ]; then
mkdir -p /tmp/blocklist mkdir -p /tmp/blocklists
cd /tmp/blocklist rm -rf /tmp/blocklists/*
cd /tmp/blocklists
wget -q $BLOCKLIST_URL wget -q $BLOCKLIST_URL
if [ $? == 0 ]; then if [ $? == 0 ]; then
gunzip *.gz gunzip *.gz
if [ $? == 0 ]; then if [ $? == 0 ]; then
chmod go+r * chmod go+r *
rm /config/blocklists/* rm -rf /config/blocklists/*
cp /tmp/blocklists/* /config/blocklists cp /tmp/blocklists/* /config/blocklists
s6-svc -h /var/run/s6/services/transmission s6-svc -h /var/run/s6/services/transmission
fi fi