factorio-docker/0.17/files/docker-update-mods.sh

19 lines
382 B
Bash
Executable File

#!/bin/bash
set -eou pipefail
if [[ -f /run/secrets/username ]]; then
USERNAME=$(cat /run/secrets/username)
fi
if [[ -f /run/secrets/username ]]; then
TOKEN=$(cat /run/secrets/token)
fi
if [[ -z $TOKEN ]]; then
set -- "$(jq -j ".username, \" \", .token" "$CONFIG/server-settings.json")"
USERNAME=$1
TOKEN=$2
fi
./update-mods.sh "$VERSION" "$MODS" "$USERNAME" "$TOKEN"