Skip to content

Instantly share code, notes, and snippets.

@pavax
pavax / natpmpc-transmission-update.sh
Last active June 13, 2026 08:31
Bash script to open a port using natpmpc and update the opened port in transmission-daemon
#!/bin/bash
# The gatway to send the natpmp commands
natpmp_ip="10.2.0.1"
# Path to the lock file
lock_file="/tmp/transmission_update.lock"
# Path to the Transmission settings.json file
settings_file="/etc/transmission-daemon/settings.json"