fixed update script

This commit is contained in:
Paul Hendryx
2016-11-02 09:38:19 -04:00
parent 96a625b9cd
commit a1b5353ea2

View File

@@ -1,10 +1,19 @@
#!/usr/bin/with-contenv bash
BLOCKLIST_ENABLED=`jq -r '.["blocklist-enabled"]' settings.json`
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
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