From a706d1d59d4814900bdf8fc01c5f2bf5aae00157 Mon Sep 17 00:00:00 2001 From: vhsdream Date: Sun, 27 Jul 2025 12:42:41 -0400 Subject: [PATCH] MediaManager: add check for config.example.toml --- install/mediamanager-install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install/mediamanager-install.sh b/install/mediamanager-install.sh index 2526b33c..b827cfc9 100644 --- a/install/mediamanager-install.sh +++ b/install/mediamanager-install.sh @@ -67,6 +67,10 @@ fi msg_info "Creating config and start script" LOCAL_IP="$(hostname -I | awk '{print $1}')" SECRET="$(openssl rand -hex 32)" +config_file="config.example.toml" +if [[ ! -f /opt/mediamanager/"$config_file" ]]; then + config_file="config.toml" +fi sed -e "s/localhost:8/$LOCAL_IP:8/g" \ -e "s|/data/|$CONFIG_DIR|g" \ -e 's/"db"/"localhost"/' \ @@ -76,7 +80,7 @@ sed -e "s/localhost:8/$LOCAL_IP:8/g" \ -e "/^token_secret/s/=.*/= \"$SECRET\"/" \ -e "s/admin@example.com/$EMAIL/" \ -e '/^admin_emails/s/, .*/]/' \ - /opt/mediamanager/config.example.toml >/opt/mm_data/config.toml + /opt/mediamanager/"$config_file" >/opt/mm_data/config.toml mkdir -p "$CONFIG_DIR"/{images,tv,movies,torrents}