I want to update the settings.json file every time the machine boots, and before transmission-daemon starts. More specifically, the peer-port variable. I want the new value to be read from a plain text file. Is this possible? How?
My Setup
- Raspberry Pi 3b+
- Raspbian Buster
- transmission-daemon & transmision web interface
- Private Internet Access on openvpn client.
- settings.json location:
Code: Select all
/home/transmission/.settings/transmission-daemon/settings.json
- file with desired value:
Code: Select all
/home/pi/Documents/forwardedport.txt
Currently, transmission-daemon is set to start on boot by the user transmission's crontab. This is the relevant line.
Code: Select all
@reboot transmission-daemon
Code: Select all
Loading port forward assignment information...
{"port":56439}
This is the relevant line.
Code: Select all
@reboot sleep 75 && /etc/openvpn/port_forwarding.sh > /home/pi/Documents/forwardedport.txt
regards,
avk000