#!/bin/bash #Requires systemd unit (transmission.service) to run on boot # #[Unit] #Description=Script # #[Service] #ExecStart=/usr/bin/transmission-port.sh #User=meftimes #Group=meftimes # #[Install] #WantedBy=multi-user.target # Make executable and move to /usr/bin/ sleep 10 docker stop transmission sleep 10 sed -i "/\"peer-port\"/c\ \"peer-port\": $(docker exec gluetun cat /tmp/gluetun/forwarded_port)," /home/meftimes/docker/gluetun-transmission-chromium/transmission-config/settings.json sleep 10 docker start transmission sleep 10 docker restart chromium