user RAM drive instead of temp

This commit is contained in:
rootzoll 2021-08-26 22:16:19 +02:00
parent 6925cdc902
commit fa1eb0e233
2 changed files with 8 additions and 8 deletions

View File

@ -13,7 +13,7 @@ debugLevel=0
writeMemoryfile=1
# if "logFile" points to an existing file => logging enabled
logFile=/mnt/hdd/temp/raspiblitzipinfo.log
logFile=/var/cache/raspiblitz/raspiblitzipinfo.log
# get the ISO timestamp for log output
@ -77,7 +77,7 @@ if [ ${debugLevel} -gt 10 ]; then for i in $( seq 0 4 ); do printf " %2d: %-10s
# get the values from a prior run, that file will not be changes as long as all the values stay the same
memoryFile=/mnt/hdd/temp/raspiblitzipinfo.out
memoryFile=/var/cache/raspiblitz/raspiblitzipinfo.out
source ${memoryFile} 2>/dev/null
# prepare to count the changes

View File

@ -26,11 +26,11 @@ if [ "$1" == "off" ]; then
sudo sed -i "/# Hidden Service for ${service}/,/^\s*$/{d}" /etc/tor/torrc
# remove double empty lines
sudo cp /etc/tor/torrc /mnt/hdd/temp/tmp
sudo chmod 777 /mnt/hdd/temp/tmp
sudo chown admin:admin /mnt/hdd/temp/tmp
sudo awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' /etc/tor/torrc > /mnt/hdd/temp/tmp
sudo mv /mnt/hdd/temp/tmp /etc/tor/torrc
sudo cp /etc/tor/torrc /var/cache/raspiblitz/tmp
sudo chmod 777 /var/cache/raspiblitz/tmp
sudo chown admin:admin /var/cache/raspiblitz/tmp
sudo awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' /etc/tor/torrc > /var/cache/raspiblitz/tmp
sudo mv /var/cache/raspiblitz/tmp /etc/tor/torrc
sudo chmod 644 /etc/tor/torrc
sudo chown bitcoin:bitcoin /etc/tor/torrc
@ -84,7 +84,7 @@ HiddenServiceVersion 3
HiddenServicePort $toPort 127.0.0.1:$fromPort" | sudo tee -a /etc/tor/torrc
# remove double empty lines
awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' /etc/tor/torrc | sudo tee /mnt/hdd/temp/tmp >/dev/null && sudo mv /mnt/hdd/temp/tmp /etc/tor/torrc
awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' /etc/tor/torrc | sudo tee /var/cache/raspiblitz/tmp >/dev/null && sudo mv /var/cache/raspiblitz/tmp /etc/tor/torrc
# check and insert second port pair
if [ ${#toPort2} -gt 0 ]; then