mirror of
https://git.netzspielplatz.de/docker-multiarch/jdownloader2-headless.git
synced 2025-11-08 17:19:32 +00:00
auto create myjdownloader config
This commit is contained in:
parent
27789b10a7
commit
177c0955be
3 changed files with 13 additions and 2 deletions
|
|
@ -21,6 +21,17 @@ else
|
|||
usermod -ag $GID
|
||||
fi
|
||||
|
||||
# Set MyJDownloader credentials
|
||||
CONFIG_FILE="/opt/JDownloader/cfg/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json"
|
||||
if [ ! -z "$EMAIL" ] ; then
|
||||
if [ ! -f "$CONFIG_FILE" ] || [ ! -s "$CONFIG_FILE" ] ; then
|
||||
echo '{}' > "$CONFIG_FILE"
|
||||
fi
|
||||
|
||||
CFG=$(jq -r --arg EMAIL "$EMAIL" --arg PASSWORD "$PASSWORD" '.email = $EMAIL | .password = $PASSWORD' "$CONFIG_FILE")
|
||||
[ ! -z "$CFG" ] && echo "$CFG" > "$CONFIG_FILE"
|
||||
fi
|
||||
|
||||
chown -R $UID:$GID /opt/JDownloader
|
||||
|
||||
# Sometimes this gets deleted. Just copy it every time.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue