stardew-multiplayer-docker/docker/scripts/configure-remotecontrol-mod.sh

11 lines
568 B
Bash
Raw Normal View History

2021-01-23 20:04:33 +00:00
#!/bin/sh
# Quit if we don't have any default admins
if [ -z "${REMOTE_CONTROL_DEFAULT_ADMINS}" ] || [ ! -f "/data/Stardew/Stardew Valley/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/Mods/RemoteControl/config.json" > "/data/Stardew/Stardew Valley/Mods/RemoteControl/config.json.out"
mv -f "/data/Stardew/Stardew Valley/Mods/RemoteControl/config.json.out" "/data/Stardew/Stardew Valley/Mods/RemoteControl/config.json"