|
@@ -12,7 +12,7 @@
|
|
proto.xmr.daemon: Monero base protocol daemon classes
|
|
proto.xmr.daemon: Monero base protocol daemon classes
|
|
"""
|
|
"""
|
|
|
|
|
|
-import os
|
|
|
|
|
|
+import sys, os
|
|
|
|
|
|
from ...cfg import gc
|
|
from ...cfg import gc
|
|
from ...util import list_gen,die,contains_any
|
|
from ...util import list_gen,die,contains_any
|
|
@@ -28,6 +28,7 @@ class monero_daemon(CoinDaemon):
|
|
cfg_file = 'bitmonero.conf'
|
|
cfg_file = 'bitmonero.conf'
|
|
datadirs = {
|
|
datadirs = {
|
|
'linux': [gc.home_dir,'.bitmonero'],
|
|
'linux': [gc.home_dir,'.bitmonero'],
|
|
|
|
+ 'darwin': [gc.home_dir,'.bitmonero'],
|
|
'win32': ['/','c','ProgramData','bitmonero']
|
|
'win32': ['/','c','ProgramData','bitmonero']
|
|
}
|
|
}
|
|
|
|
|
|
@@ -53,6 +54,8 @@ class monero_daemon(CoinDaemon):
|
|
test_connection = False,
|
|
test_connection = False,
|
|
daemon = self )
|
|
daemon = self )
|
|
|
|
|
|
|
|
+ self.use_pidfile = sys.platform == 'linux'
|
|
|
|
+
|
|
self.shared_args = list_gen(
|
|
self.shared_args = list_gen(
|
|
['--no-zmq'],
|
|
['--no-zmq'],
|
|
[f'--p2p-bind-port={self.p2p_port}', self.p2p_port],
|
|
[f'--p2p-bind-port={self.p2p_port}', self.p2p_port],
|
|
@@ -64,7 +67,7 @@ class monero_daemon(CoinDaemon):
|
|
['--hide-my-port'],
|
|
['--hide-my-port'],
|
|
['--no-igd'],
|
|
['--no-igd'],
|
|
[f'--data-dir={self.datadir}', self.non_dfl_datadir],
|
|
[f'--data-dir={self.datadir}', self.non_dfl_datadir],
|
|
- [f'--pidfile={self.pidfile}', self.platform == 'linux'],
|
|
|
|
|
|
+ [f'--pidfile={self.pidfile}', self.use_pidfile],
|
|
['--detach', not (self.opt.no_daemonize or self.platform=='win32')],
|
|
['--detach', not (self.opt.no_daemonize or self.platform=='win32')],
|
|
['--offline', not self.opt.online],
|
|
['--offline', not self.opt.online],
|
|
)
|
|
)
|
|
@@ -132,6 +135,8 @@ class MoneroWalletDaemon(RPCDaemon):
|
|
self.pidfile = os.path.join(self.datadir,id_str+'.pid')
|
|
self.pidfile = os.path.join(self.datadir,id_str+'.pid')
|
|
self.logfile = os.path.join(self.datadir,id_str+'.log')
|
|
self.logfile = os.path.join(self.datadir,id_str+'.log')
|
|
|
|
|
|
|
|
+ self.use_pidfile = sys.platform == 'linux'
|
|
|
|
+
|
|
self.proxy = proxy
|
|
self.proxy = proxy
|
|
self.monerod_addr = monerod_addr
|
|
self.monerod_addr = monerod_addr
|
|
self.monerod_port = (
|
|
self.monerod_port = (
|