resonite/scripts/02_setup_config.sh

25 lines
793 B
Bash
Raw Normal View History

2024-11-19 04:30:43 +00:00
#!/bin/bash
## Setup Resonite Config
echo "Setting up Resonite Config"
# if CONFIG_FILE is not set, use default config path
if [ ! -f $CONFIG_FILE ]; then
echo "No Resonite Config found, copying from template"
2024-12-09 21:58:51 +00:00
cp /mnt/defaults/resonite.json $CONFIG_FILE
2024-11-19 04:30:43 +00:00
fi
CONFIG_DATA=$(grep -v " null," "$CONFIG_FILE")
if [ ! -n "$CONFIG_DATA" ]; then
echo "Config file is empty, copying from template"
2024-12-09 21:58:51 +00:00
cp /mnt/defaults/resonite.json $CONFIG_FILE
2024-11-19 04:30:43 +00:00
CONFIG_DATA=$(grep -v " null," "$CONFIG_FILE")
fi
## Setup Modloader Configs
if [ "$RESONITE_MOD_LOADER" == "true" ]; then
echo "Setting up Modloader Configs"
DEFAULT_RESONITE_ARGS=$(echo "$DEFAULT_RESONITE_ARGS -LoadAssembly /data/resonite/Headless/Libraries/ResoniteModLoader.dll")
else
echo "Modloader is disabled"
fi