This commit is contained in:
Alexandre
2023-12-30 08:26:34 +01:00
parent f93960514a
commit 614305daef
5 changed files with 22 additions and 7 deletions

View File

@@ -0,0 +1,6 @@
#!/usr/bin/bashio
if [ -f /homeassistant/unpackerr.conf ]; then
bashio::log.warning "Migrating unpackerr.conf to /addons_configs/$HOSTNAME/unpackerr.conf"
mv /homeassistant/unpackerr.conf /config/unpackerr.conf
fi

View File

@@ -1,11 +1,14 @@
#!/usr/bin/bashio
# Set user
if bashio::config.has_value 'PUID'; then PUID="$(bashio::config 'PUID')"; fi
if bashio::config.has_value 'PGID'; then PGID="$(bashio::config 'PGID')"; fi
if bashio::config.has_value 'PUID'; then export PUID="$(bashio::config 'PUID')"; fi
if bashio::config.has_value 'PGID'; then export PGID="$(bashio::config 'PGID')"; fi
if bashio::config.has_value 'TZ'; then export TZ="$(bashio::config 'TZ')"; fi
# Enable watch folder
if bashio::config.has_value "watch_path"; then
# Info
bashio::log.info "Watch path is $(bashio::config 'watch_path'), creating folder and setting permission"
# Enables folders
sed -i "/[[folder]]/c [[folder]]" /config/unpackerr.conf
# Set downloads path
@@ -20,6 +23,8 @@ fi
# Enable extraction folder
if bashio::config.has_value "extraction_path"; then
# Info
bashio::log.info "Extraction path is $(bashio::config 'extraction_path'), creating folder and setting permission"
# Enables folders
sed -i "/[[folder]]/c [[folder]]" /config/unpackerr.conf
# Set extraction path