mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-23 21:18:07 +00:00
Add poold service
This commit is contained in:
parent
1802b97c42
commit
07f262235e
26
rootfs/standard/etc/systemd/system/poold.service
Normal file
26
rootfs/standard/etc/systemd/system/poold.service
Normal file
|
@ -0,0 +1,26 @@
|
|||
# poold service
|
||||
# /etc/systemd/system/poold.service
|
||||
|
||||
[Unit]
|
||||
Description=poold
|
||||
Wants=lnd.service
|
||||
After=lnd.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
||||
ExecStartPre=/usr/bin/wait_on_lnd.sh
|
||||
ExecStart=/usr/local/bin/poold --basedir=/mnt/hdd/mynode/pool
|
||||
|
||||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
KillMode=control-group
|
||||
TimeoutSec=240
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=poold
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -7,7 +7,7 @@ WorkingDirectory=/mnt/hdd/mynode/whirlpool
|
|||
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
||||
ExecStartPre=/usr/bin/wait_on_bitcoin.sh
|
||||
ExecStartPre=/usr/bin/mynode_pre_whirlpool.sh
|
||||
ExecStart=/usr/bin/java -jar /opt/mynode/whirlpool/whirlpool.jar --server=mainnet --tor --auto-mix --mixs-target=3 --listen
|
||||
ExecStart=/usr/bin/java -jar /opt/mynode/whirlpool/whirlpool.jar --server=mainnet --resync --tor --auto-mix --mixs-target=3 --listen
|
||||
User=bitcoin
|
||||
Group=bitcoin
|
||||
Type=simple
|
||||
|
|
|
@ -687,6 +687,7 @@ systemctl enable glances
|
|||
systemctl enable webssh2
|
||||
systemctl enable tor
|
||||
systemctl enable loopd
|
||||
systemctl enable poold
|
||||
systemctl enable rotate_logs
|
||||
systemctl enable corsproxy_btcrpc
|
||||
|
||||
|
|
|
@ -415,6 +415,24 @@ def get_mynode_status():
|
|||
status = STATE_UNKNOWN
|
||||
return status
|
||||
|
||||
#==================================
|
||||
# Log functions (non-systemd based)
|
||||
#==================================
|
||||
def get_file_log(file_path):
|
||||
status_log = ""
|
||||
|
||||
if not os.path.isfile("file_path"):
|
||||
return "MISSING FILE"
|
||||
|
||||
try:
|
||||
status_log = subprocess.check_output(["tail","-n","200",file_path]).decode("utf8")
|
||||
lines = status_log.split('\n')
|
||||
lines.reverse()
|
||||
status_log = '\n'.join(lines)
|
||||
except:
|
||||
status_log = "ERROR"
|
||||
return status_log
|
||||
|
||||
#==================================
|
||||
# Specific Service Status / Colors
|
||||
#==================================
|
||||
|
|
|
@ -158,18 +158,16 @@ def page_status():
|
|||
quicksync_status_log = "ERROR"
|
||||
|
||||
# Get Bitcoin Status
|
||||
bitcoin_status_log = ""
|
||||
try:
|
||||
bitcoin_status_log = subprocess.check_output(["tail","-n","200","/mnt/hdd/mynode/bitcoin/debug.log"]).decode("utf8")
|
||||
lines = bitcoin_status_log.split('\n')
|
||||
lines.reverse()
|
||||
bitcoin_status_log = '\n'.join(lines)
|
||||
except:
|
||||
bitcoin_status_log = "ERROR"
|
||||
bitcoin_status_log = get_file_log("/mnt/hdd/mynode/bitcoin/debug.log")
|
||||
# GET lnd, loopd, poold logs from file???
|
||||
#lnd_status_log = get_file_log("/mnt/hdd/mynode/lnd/logs/bitcoin/mainnet/lnd.log")
|
||||
#loopd_status_log = get_file_log("/mnt/hdd/mynode/loop/logs/mainnet/loopd.log")
|
||||
#poold_status_log = get_file_log("/mnt/hdd/mynode/pool/logs/mainnet/poold.log")
|
||||
|
||||
# Get Status
|
||||
lnd_status_log = get_journalctl_log("lnd")
|
||||
loopd_status_log = get_journalctl_log("loopd")
|
||||
poold_status_log = get_journalctl_log("poold")
|
||||
lndhub_status_log = get_journalctl_log("lndhub")
|
||||
tor_status_log = get_journalctl_log("tor@default")
|
||||
electrs_status_log = get_journalctl_log("electrs")
|
||||
|
@ -219,6 +217,9 @@ def page_status():
|
|||
"loopd_status_log": loopd_status_log,
|
||||
"loopd_status": get_service_status_basic_text("loopd"),
|
||||
"loopd_status_color": get_service_status_color("loopd"),
|
||||
"poold_status_log": poold_status_log,
|
||||
"poold_status": get_service_status_basic_text("poold"),
|
||||
"poold_status_color": get_service_status_color("poold"),
|
||||
"tor_status_log": tor_status_log,
|
||||
"tor_status": get_service_status_basic_text("tor@default"),
|
||||
"tor_status_color": get_service_status_color("tor@default"),
|
||||
|
|
|
@ -31,6 +31,11 @@
|
|||
$("#loopd_status").show();
|
||||
});
|
||||
|
||||
$("#show_poold_status").on("click", function() {
|
||||
$("#show_poold_status").hide(0);
|
||||
$("#poold_status").show();
|
||||
});
|
||||
|
||||
$("#show_lndhub_status").on("click", function() {
|
||||
$("#show_lndhub_status").hide(0);
|
||||
$("#lndhub_status").show();
|
||||
|
@ -244,6 +249,17 @@
|
|||
<div class="divider"></div>
|
||||
{% endif %}
|
||||
|
||||
{% if lnd_wallet_exists %}
|
||||
<div class="settings_block_subheader">Pool Status</div>
|
||||
<div class="settings_block_subheader_status">
|
||||
<div class="settings_block_subheader_status_icon {{ poold_status_color }}"></div>
|
||||
{{ poold_status }}
|
||||
</div>
|
||||
<button id="show_poold_status" class="ui-button ui-widget ui-corner-all settings_button_small">Show Log</button>
|
||||
<div id="poold_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{poold_status_log}}</pre></div>
|
||||
<div class="divider"></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="settings_block_subheader">Electrum Server Status</div>
|
||||
<div class="settings_block_subheader_status">
|
||||
<div class="settings_block_subheader_status_icon {{ electrs_status_color }}"></div>
|
||||
|
|
|
@ -773,6 +773,7 @@ systemctl enable bitcoind
|
|||
systemctl enable seed_bitcoin_peers
|
||||
systemctl enable lnd
|
||||
systemctl enable loopd
|
||||
systemctl enable poold
|
||||
systemctl enable lnd_unlock
|
||||
systemctl enable lnd_backup
|
||||
systemctl enable lnd_admin_files
|
||||
|
|
Loading…
Reference in New Issue
Block a user