mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-16 16:04:08 +01:00
Added update script
parent
726a6f6b10
commit
646b4d8b00
@ -101,6 +101,27 @@ sudo docker pull linuxserver/radarr
|
|||||||
sudo systemctl restart docker-radarr
|
sudo systemctl restart docker-radarr
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you want to automate this, you can use the following script (let it run with a systemd timer):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
images=( linuxserver/jackett linuxserver/radarr linuxserver/sonarr )
|
||||||
|
containers=( jackett radarr sonarr )
|
||||||
|
services=( docker-jackett docker-radarr docker-sonarr )
|
||||||
|
|
||||||
|
for ((i=0; i<${#images[*]}; i++)); do
|
||||||
|
echo "Pulling docker image: ${images[i]}"
|
||||||
|
docker pull ${images[i]}
|
||||||
|
if [[ $(docker inspect --type=image --format='{{.Id}}' ${images[i]}) != $(docker inspect --type=container --format='{{.Image}}' ${containers[i]}) ]]; then
|
||||||
|
echo "Restarting service: ${services[i]}"
|
||||||
|
systemctl restart ${services[i]}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
Modify the variables `images`, `containers` and `services` according to your system. This script will only restart a service/container if the docker image was updated by `docker pull`.
|
||||||
|
|
||||||
# Doing some cleanup
|
# Doing some cleanup
|
||||||
|
|
||||||
With these commands you can do some cleanup of docker images and containers:
|
With these commands you can do some cleanup of docker images and containers:
|
||||||
|
Loading…
Reference in New Issue
Block a user