Do not edit tor systemd script (#1506)

* Do not edit tor systemd script

Systemd unit files under `/lib` should not be edited.

This commit will make use of
`/etc/systemd/system/tor@default.service.d/` instead

* Update internet.tor.sh

Suppress output of `tee`.

* Update internet.tor.sh

avoid duplicate lines

Co-authored-by: frennkie <mail@rhab.de>
This commit is contained in:
Alessio Caiazza 2020-09-10 13:53:21 +02:00 committed by GitHub
parent 5542a10716
commit 7a992500f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -341,7 +341,10 @@ EOF
sudo chown -R bitcoin:bitcoin /var/run/tor/ 2>/dev/null
echo ""
echo "ReadWriteDirectories=-/mnt/hdd/tor" | sudo tee -a /lib/systemd/system/tor@default.service
sudo mkdir -p /etc/systemd/system/tor@default.service.d
if ! grep -Eq "^ReadWriteDirectories=" /etc/systemd/system/tor@default.service.d/raspiblitz.conf; then
echo -e "[Service]\nReadWriteDirectories=-/mnt/hdd/tor" | sudo tee -a /etc/systemd/system/tor@default.service.d/raspiblitz.conf >/dev/null
fi
else
echo "TOR package/service is installed and was prepared earlier .. just activating again"