stardew-multiplayer-docker/docker/scripts/configure-remotecontrol-mod.sh
2024-03-20 17:01:57 -04:00

11 lines
593 B
Bash

#!/bin/sh
# Quit if we don't have any default admins
if [ -z "${REMOTE_CONTROL_DEFAULT_ADMINS}" ] || [ ! -f "/data/Stardew/Stardew Valley/game/Mods/RemoteControl/config.json" ]; then
return
fi
# Add default admins to the admin list
jq ".admins[.admins | length] |= . + ${REMOTE_CONTROL_DEFAULT_ADMINS}" "/data/Stardew/Stardew Valley/game/Mods/RemoteControl/config.json" > "/data/Stardew/Stardew Valley/game/Mods/RemoteControl/config.json.out"
mv -f "/data/Stardew/Stardew Valley/game/Mods/RemoteControl/config.json.out" "/data/Stardew/Stardew Valley/game/Mods/RemoteControl/config.json"