2020-07-07 13:37:23 +00:00
|
|
|
"""
|
|
|
|
Onionr - Private P2P Communication.
|
|
|
|
|
|
|
|
Restart Onionr managed Tor
|
|
|
|
"""
|
2019-08-10 01:04:56 +00:00
|
|
|
import netcontroller
|
2020-02-03 01:07:48 +00:00
|
|
|
import config
|
2020-07-07 13:37:23 +00:00
|
|
|
"""
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
"""
|
|
|
|
|
2020-02-03 01:07:48 +00:00
|
|
|
|
2019-08-10 01:04:56 +00:00
|
|
|
def restart(comm_inst):
|
2020-02-03 01:07:48 +00:00
|
|
|
if not config.get('tor.use_existing_tor', False):
|
|
|
|
net = comm_inst.shared_state.get(netcontroller.NetController)
|
|
|
|
net.killTor()
|
|
|
|
net.startTor()
|