Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update focal branch with dev fixes #2611

Merged
merged 6 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/image-build-template-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow}}
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,9 @@ RUN echo "installing Transmission" && set -x \
RUN apt-get update && apt-get install -y \
dumb-init openvpn privoxy \
tzdata dnsutils iputils-ping ufw openssh-client git jq curl wget unrar unzip bc \
&& ln -s /usr/share/transmission/web/style /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/share/transmission/web/images /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/share/transmission/web/javascript /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/share/transmission/web/index.html /opt/transmission-ui/transmission-web-control/index.original.html \
&& ln -s /usr/local/share/transmission/public_html/images /opt/transmission-ui/transmission-web-control \
&& ln -s /usr/local/share/transmission/public_html/transmission-app.js /opt/transmission-ui/transmission-web-control/transmission-app.js \
&& ln -s /usr/local/share/transmission/public_html/index.html /opt/transmission-ui/transmission-web-control/index.original.html \
&& rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* \
&& groupmod -g 1000 users \
&& useradd -u 911 -U -d /config -s /bin/false abc \
Expand Down
8 changes: 7 additions & 1 deletion openvpn/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,13 @@ function ufwAllowPort {
portNum=${1}
if [[ "${ENABLE_UFW,,}" == "true" ]] && [[ -n "${portNum-}" ]]; then
echo "allowing ${portNum} through the firewall"
ufw allow ${portNum}
if [[ $portNum == *":"* ]];
then
ufw allow ${portNum}/tcp
ufw allow ${portNum}/udp
else
ufw allow ${portNum}
fi
fi
}

Expand Down
2 changes: 1 addition & 1 deletion privoxy/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set_port()
# Set the port for the IPv4 interface
adr=$(ip -4 a show eth0| grep -oP "(?<=inet )([^/]+)")
adr=${adr:-"0.0.0.0"}
sed -i -E "s/^listen-address\s+127.*/listen-address ${adr}:$1/" "$2"
sed -i -E "s/^listen-address\s+.*/listen-address ${adr}:$1/" "$2"

# Remove the listen-address for IPv6 for now. IPv6 compatibility should come later
sed -i -E "s/^listen-address\s+\[\:\:1.*//" "$2"
Expand Down
2 changes: 1 addition & 1 deletion scripts/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if [[ ${WEBPROXY_ENABLED} =~ [yY][eE]?[Ss]?|[tT][Rr][Uu][eE] ]]; then
if [[ ${PROXY} -eq 0 ]]; then
echo "Privoxy warning: process was stopped, restarting."
fi
proxy_ip=$(grep -oP "(?<=^listen-address).*$" /etc/privoxy/config | sed 's/ //g')
proxy_ip=$(grep -oP "(?<=^listen-address )[0-9\.]+" /etc/privoxy/config)
cont_ip=$(ip -j a show dev eth0 | jq -r .[].addr_info[].local)
if [[ ${proxy_ip} != ${cont_ip} ]]; then
echo "Privoxy error: container ip (${cont_ip} has changed: privoxy listening to ${proxy_ip}, restarting privoxy."
Expand Down
2 changes: 1 addition & 1 deletion transmission/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ exec su --preserve-environment ${RUN_AS} -s /bin/bash -c "/usr/local/bin/transmi


# Configure port forwarding if applicable
if [[ -x /etc/openvpn/${OPENVPN_PROVIDER,,}/update-port.sh && (-z $DISABLE_PORT_UPDATER || "false" = "$DISABLE_PORT_UPDATER") ]]; then
if [[ -f /etc/openvpn/${OPENVPN_PROVIDER,,}/update-port.sh && (-z $DISABLE_PORT_UPDATER || "false" = "$DISABLE_PORT_UPDATER") ]]; then
echo "Provider ${OPENVPN_PROVIDER^^} has a script for automatic port forwarding. Will run it now."
echo "If you want to disable this, set environment variable DISABLE_PORT_UPDATER=true"
exec /etc/openvpn/${OPENVPN_PROVIDER,,}/update-port.sh &
Expand Down
2 changes: 1 addition & 1 deletion transmission/userSetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if [ -n "$PUID" ] && [ ! "$(id -u root)" -eq "$PUID" ]; then
if [ -z "$TRANSMISSION_UMASK" ] ; then
# fetch from settings.json if not defined in environment
# because updateSettings.py is called after this script is run
TRANSMISSION_UMASK=$(jq .umask ${TRANSMISSION_HOME}/settings.json)
TRANSMISSION_UMASK=$(jq .umask ${TRANSMISSION_HOME}/settings.json | tr -d \" )
fi

TRANSMISSION_UMASK_OCTAL=$( printf "%o\n" "${TRANSMISSION_UMASK}" )
Expand Down