added announce node config

master
Kevin Froman 2019-06-17 23:33:22 -05:00
parent a03d0268a8
commit 4f44906740
3 changed files with 3 additions and 2 deletions

View File

@ -143,7 +143,7 @@ class OnionrCommunicatorDaemon:
netCheckTimer = OnionrCommunicatorTimers(self, netcheck.net_check, 600, myArgs=[self]) netCheckTimer = OnionrCommunicatorTimers(self, netcheck.net_check, 600, myArgs=[self])
# Announce the public API server transport address to other nodes if security level allows # Announce the public API server transport address to other nodes if security level allows
if config.get('general.security_level', 1) == 0: if config.get('general.security_level', 1) == 0 and config.get('general.announce_node', True):
# Default to high security level incase config breaks # Default to high security level incase config breaks
announceTimer = OnionrCommunicatorTimers(self, announcenode.announce_node, 3600, myArgs=[self], requiresPeer=True, maxThreads=1) announceTimer = OnionrCommunicatorTimers(self, announcenode.announce_node, 3600, myArgs=[self], requiresPeer=True, maxThreads=1)
announceTimer.count = (announceTimer.frequency - 120) announceTimer.count = (announceTimer.frequency - 120)

View File

@ -1,6 +1,7 @@
{ {
"general" : { "general" : {
"dev_mode" : true, "dev_mode" : true,
"announce_node" : true,
"display_header" : false, "display_header" : false,
"minimum_block_pow" : 4, "minimum_block_pow" : 4,
"minimum_send_pow" : 4, "minimum_send_pow" : 4,

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
cd "$(dirname "$0")" cd "$(dirname "$0")"
echo "starting Onionr daemon..." echo "starting Onionr daemon..."
echo "run onionr.sh stop to stop the daemon, or onionr.sh start to get output" echo "run onionr.sh stop to stop the daemon"
exec nohup ./onionr.sh start > /dev/null 2>&1 & disown exec nohup ./onionr.sh start > /dev/null 2>&1 & disown