This commit is contained in:
CanbiZ 2025-11-22 17:41:01 +01:00
parent ba28ede3e3
commit 48fafb8c28

View File

@ -49,12 +49,13 @@ chmod +x /opt/privoxy/*.sh
$STD ln -s /usr/bin/transmission-daemon /usr/local/bin/transmission-daemon $STD ln -s /usr/bin/transmission-daemon /usr/local/bin/transmission-daemon
$STD update-alternatives --set iptables /usr/sbin/iptables-legacy $STD update-alternatives --set iptables /usr/sbin/iptables-legacy
$STD update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy $STD update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
rm -rf /opt/docker-transmission-openvpn
msg_ok "Configured transmission-openvpn" msg_ok "Configured transmission-openvpn"
msg_info "Creating Service" msg_info "Creating Service"
LOCAL_SUBNETS=$( LOCAL_SUBNETS=$(
ip -o -4 addr show \ ip -o -4 addr show |
| awk '!/127.0.0.1/ { awk '!/127.0.0.1/ {
split($4, a, "/"); ip=a[1]; mask=a[2]; split($4, a, "/"); ip=a[1]; mask=a[2];
split(ip, o, "."); split(ip, o, ".");
if (mask < 8) { if (mask < 8) {
@ -66,8 +67,8 @@ LOCAL_SUBNETS=$(
} else { } else {
print o[1]"."o[2]"."o[3]".*"; print o[1]"."o[2]"."o[3]".*";
} }
}' \ }' |
| sort -u | paste -sd, - sort -u | paste -sd, -
) )
TRANSMISSION_RPC_WHITELIST="127.0.0.*,${LOCAL_SUBNETS}" TRANSMISSION_RPC_WHITELIST="127.0.0.*,${LOCAL_SUBNETS}"
mkdir -p /opt/transmission-openvpn mkdir -p /opt/transmission-openvpn
@ -126,15 +127,9 @@ EnvironmentFile=/opt/transmission-openvpn/.env
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
systemctl enable --now -q openvpn-custom.service systemctl enable -q --now openvpn-custom
msg_ok "Created Service" msg_ok "Created Service"
motd_ssh motd_ssh
customize customize
cleanup_lxc
msg_info "Cleaning up"
$STD apt -y autoremove
$STD apt -y autoclean
$STD apt -y clean
rm -rf /opt/docker-transmission-openvpn
msg_ok "Cleaned"