Skip to content

Commit

Permalink
get second line of rpc secret file, not last one
Browse files Browse the repository at this point in the history
  • Loading branch information
vic1707 committed Oct 18, 2024
1 parent fd609f2 commit 73c1386
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openvpn/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ else
fi

if [[ -f /run/secrets/rpc_creds ]]; then
export TRANSMISSION_RPC_USERNAME=$(head -1 /run/secrets/rpc_creds)
export TRANSMISSION_RPC_PASSWORD=$(tail -1 /run/secrets/rpc_creds)
export TRANSMISSION_RPC_USERNAME=$(sed -n '1p' /run/secrets/rpc_creds)
export TRANSMISSION_RPC_PASSWORD=$(sed -n '2p' /run/secrets/rpc_creds)
fi
echo "${TRANSMISSION_RPC_USERNAME}" > /config/transmission-credentials.txt
echo "${TRANSMISSION_RPC_PASSWORD}" >> /config/transmission-credentials.txt
Expand Down

0 comments on commit 73c1386

Please sign in to comment.