2022-04-18 00:59:35 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# See https://stackoverflow.com/a/44864004 for the sed GNU/BSD compatible hack
|
|
|
|
|
|
|
|
echo "Updating Radarr configuration..."
|
|
|
|
until [ -f ./radarr/config.xml ]
|
|
|
|
do
|
|
|
|
sleep 5
|
|
|
|
done
|
|
|
|
sed -i.bak "s/<UrlBase><\/UrlBase>/<UrlBase>\/radarr<\/UrlBase>/" ./radarr/config.xml && rm ./radarr/config.xml.bak
|
2023-05-14 06:19:04 +02:00
|
|
|
sed -i.bak 's/^RADARR_API_KEY=.*/RADARR_API_KEY='"$(sed -n 's/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p' ./radarr/config.xml)"'/' .env && rm .env.bak
|
2022-04-18 00:59:35 +02:00
|
|
|
|
|
|
|
echo "Updating Sonarr configuration..."
|
|
|
|
until [ -f ./sonarr/config.xml ]
|
|
|
|
do
|
|
|
|
sleep 5
|
|
|
|
done
|
|
|
|
sed -i.bak "s/<UrlBase><\/UrlBase>/<UrlBase>\/sonarr<\/UrlBase>/" ./sonarr/config.xml && rm ./sonarr/config.xml.bak
|
2023-05-14 06:19:04 +02:00
|
|
|
sed -i.bak 's/^SONARR_API_KEY=.*/SONARR_API_KEY='"$(sed -n 's/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p' ./sonarr/config.xml)"'/' .env && rm .env.bak
|
2022-04-18 00:59:35 +02:00
|
|
|
|
2023-08-18 05:24:28 +02:00
|
|
|
echo "Updating Lidarr configuration..."
|
|
|
|
until [ -f ./lidarr/config.xml ]
|
|
|
|
do
|
|
|
|
sleep 5
|
|
|
|
done
|
|
|
|
sed -i.bak "s/<UrlBase><\/UrlBase>/<UrlBase>\/lidarr<\/UrlBase>/" ./lidarr/config.xml && rm ./lidarr/config.xml.bak
|
|
|
|
sed -i.bak 's/^LIDARR_API_KEY=.*/LIDARR_API_KEY='"$(sed -n 's/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p' ./lidarr/config.xml)"'/' .env && rm .env.bak
|
|
|
|
|
2022-04-18 00:59:35 +02:00
|
|
|
echo "Updating Prowlarr configuration..."
|
|
|
|
until [ -f ./prowlarr/config.xml ]
|
|
|
|
do
|
|
|
|
sleep 5
|
|
|
|
done
|
|
|
|
sed -i.bak "s/<UrlBase><\/UrlBase>/<UrlBase>\/prowlarr<\/UrlBase>/" ./prowlarr/config.xml && rm ./prowlarr/config.xml.bak
|
2023-05-14 06:19:04 +02:00
|
|
|
sed -i.bak 's/^PROWLARR_API_KEY=.*/PROWLARR_API_KEY='"$(sed -n 's/.*<ApiKey>\(.*\)<\/ApiKey>.*/\1/p' ./prowlarr/config.xml)"'/' .env && rm .env.bak
|
2022-04-18 00:59:35 +02:00
|
|
|
|
2023-02-13 06:42:29 +01:00
|
|
|
echo "Updating Jellyfin configuration..."
|
|
|
|
until [ -f ./jellyfin/network.xml ]
|
|
|
|
do
|
|
|
|
sleep 5
|
|
|
|
done
|
|
|
|
sed -i.bak "s/<BaseUrl \/>/<BaseUrl>\/jellyfin<\/BaseUrl>/" ./jellyfin/network.xml && rm ./jellyfin/network.xml.bak
|
|
|
|
|
2022-04-18 00:59:35 +02:00
|
|
|
echo "Restarting containers..."
|
2023-02-13 06:42:29 +01:00
|
|
|
docker compose restart radarr sonarr prowlarr jellyfin
|