tor-hs: refactor + readme fixes
Maintainer: me / @stokito
Run tested: 23.05.5 x86_64
Description: refactor to clean up init scripts
Just read also @stokito's other PR and he actually made some similar changes. I added him as another maintainer, in any case. This should give a decent base for @stokito's other PR to get cleaned up.
IMHO it would be better to merge the #21642 It has many atomic commits
I found the code section problematic when using a non default path for the generated file
# clean config
echo "" > $TORRC_FILE
Also changing the default path from /etc/tor/torrc_generated to /tmp/torrc_generated would reduce writes to flash memory during startup.
@codekow Please review and test my PR first https://github.com/openwrt/packages/pull/21642 The original maintainer of the package is not reachable anymore.
changing the default path from /etc/tor/torrc_generated to /tmp/torrc_generated would reduce writes to flash memory
I also proposed this:
The tor-hs itself has a problem that the generated file is stored to /etc/tor/torrc_generated which may kill NAND flash eventually. Instead we may generate the file into /var/run/tor older which is an in-memory temp folder. The generation itself may be skipped if last modify time of uci config file is before the created time of the /etc/tor/torrc_generated. The simple optimization but may safe some time on restart.
If you can prepare and test a PR with the change that would be great. I think it would be great to push the two PRs first
hi @systemcrash if you are busy then I'll make a new PR with these changes merged with the current master. I hope that I can do that on the weekend.