mirror of
https://github.com/openoms/bitcoin-tutorials.git
synced 2026-01-04 12:24:22 +01:00
mixed additions
This commit is contained in:
8
tor/checkHiddenService.sh
Normal file
8
tor/checkHiddenService.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
hidden_service="xxxxxxxxxx.onion"
|
||||
port=80
|
||||
if ! torsocks nc -zv ${hidden_service} ${port}; then
|
||||
echo "restart Tor"
|
||||
sudo systemctl restart tor@default
|
||||
fi
|
||||
10
tor/crontab.sh
Normal file
10
tor/crontab.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
if ! crontab -u admin -l | grep checkHiddenService; then
|
||||
cronjob="0,15,30,45 * * * * /home/admin/checkHiddenService"
|
||||
(
|
||||
crontab -u admin -l
|
||||
echo "$cronjob"
|
||||
) | crontab -u admin -
|
||||
fi
|
||||
echo "# The crontab for admin now is:"
|
||||
crontab -u admin -l
|
||||
echo
|
||||
Reference in New Issue
Block a user