mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-21 23:09:14 +02:00
Enable incomplete dir if used
https://github.com/alexbelgium/hassio-addons/issues/1107
This commit is contained in:
@@ -43,7 +43,10 @@ echo ""
|
|||||||
if [ -f "$TRANSMISSION_HOME"/settings.json ]; then
|
if [ -f "$TRANSMISSION_HOME"/settings.json ]; then
|
||||||
echo "Updating variables"
|
echo "Updating variables"
|
||||||
sed -i "/download-dir/c \"download-dir\": \"$(bashio::config 'TRANSMISSION_DOWNLOAD_DIR')\"," "$TRANSMISSION_HOME"/settings.json
|
sed -i "/download-dir/c \"download-dir\": \"$(bashio::config 'TRANSMISSION_DOWNLOAD_DIR')\"," "$TRANSMISSION_HOME"/settings.json
|
||||||
sed -i "/incomplete-dir/c \"incomplete-dir\": \"$(bashio::config 'TRANSMISSION_INCOMPLETE_DIR')\"," "$TRANSMISSION_HOME"/settings.json || true
|
if bashio::config.has_value 'TRANSMISSION_INCOMPLETE_DIR'; then
|
||||||
|
sed -i "/\"incomplete-dir\"/c \"incomplete-dir\": \"$(bashio::config 'TRANSMISSION_INCOMPLETE_DIR')\"," "$TRANSMISSION_HOME"/settings.json || true
|
||||||
|
sed -i "/\"incomplete-dir-enabled\"/c \"incomplete-dir-enabled\": true," "$TRANSMISSION_HOME"/settings.json || true
|
||||||
|
fi
|
||||||
sed -i "/watch-dir/c \"watch-dir\": \"$(bashio::config 'TRANSMISSION_WATCH_DIR')\"," "$TRANSMISSION_HOME"/settings.json || true
|
sed -i "/watch-dir/c \"watch-dir\": \"$(bashio::config 'TRANSMISSION_WATCH_DIR')\"," "$TRANSMISSION_HOME"/settings.json || true
|
||||||
sed -i.bak ':begin;$!N;s/,\n}/\n}/g;tbegin;P;D' "$TRANSMISSION_HOME"/settings.json
|
sed -i.bak ':begin;$!N;s/,\n}/\n}/g;tbegin;P;D' "$TRANSMISSION_HOME"/settings.json
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user