Skip to content

Instantly share code, notes, and snippets.

@TopperBG
Last active April 24, 2024 06:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TopperBG/4f9e0074ccdfb0dc84c2d1af6711a7f6 to your computer and use it in GitHub Desktop.
Save TopperBG/4f9e0074ccdfb0dc84c2d1af6711a7f6 to your computer and use it in GitHub Desktop.
Run PMM detached removable container when Tautulli detect movie/series import in Plex
#/etc/docker/daemon.json <- where to save a file, remove that line after that
{
"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]
}
#/etc/systemd/system/docker.service.d/override.conf <- where to save a file, remove that line after that
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd --config-file /etc/docker/daemon.json --containerd=/run/containerd/containerd.sock
#!/bin/bash
# Place sciprt in /config folder, mapped in Tatulli container. Change 192.168.1.110 according your setup.
curl -X DELETE "http://192.168.1.110:2375/containers/pmm-temp"
curl -X POST -H "Content-Type: application/json" "http://192.168.1.110:2375/containers/create?name=pmm-temp" -d '{
"Image": "kometateam/imagemaid",
"Cmd": ["--overlays", "--run", "-ig", "--ignore-schedules", "--no-missing"],
"HostConfig": {
"Binds": ["/root/docker/etc/plexmetamanager:/config"],
"AutoRemove": true
}
}'
curl -X POST -H "Content-Type: application/json" "http://192.168.1.110:2375/containers/pmm-temp/start"
TIMESTAMP=`date "+%Y-%m-%d %H:%M:%S"`
echo "PMM run at $TIMESTAMP" >> /config/pmm-temp.log
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment