Browse Source

changing relative path to settings, script can be run from anywhere

master
Kristian Haugene 9 years ago
parent
commit
9c65be536c
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      updateTransmissionPort.sh

+ 2
- 1
updateTransmissionPort.sh View File

passwd=$(tail -1 $PIA_PASSWD_FILE) passwd=$(tail -1 $PIA_PASSWD_FILE)
local_vpn_ip=$(ip addr show tun0 | grep inet | awk '{ print $2 }') local_vpn_ip=$(ip addr show tun0 | grep inet | awk '{ print $2 }')
pia_client_id_file=/etc/transmission-daemon/pia_client_id pia_client_id_file=/etc/transmission-daemon/pia_client_id
transmission_settings_file=/etc/transmission-daemon/settings.json
port_assignment_url=https://www.privateinternetaccess.com/vpninfo/port_forward_assignment port_assignment_url=https://www.privateinternetaccess.com/vpninfo/port_forward_assignment


# #
# #


# Check if transmission remote is set up with authentication # Check if transmission remote is set up with authentication
auth_enabled=$(grep 'rpc-authentication-required\"' settings.json | grep -oE 'true|false')
auth_enabled=$(grep 'rpc-authentication-required\"' $transmission_settings_file | grep -oE 'true|false')
if [[ "true" = "$auth_enabled" ]] if [[ "true" = "$auth_enabled" ]]
then then
echo "transmission auth required" echo "transmission auth required"

Loading…
Cancel
Save