mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-27 06:54:00 +00:00
Auto device type detection
This commit is contained in:
parent
13c3605ce5
commit
6abe78e88f
|
@ -1,30 +0,0 @@
|
|||
|
||||
CONFIG = {}
|
||||
|
||||
# Device Config
|
||||
CONFIG["device_type"] = "debian"
|
||||
|
||||
# Enabled Features
|
||||
CONFIG["rtl_enabled"] = True
|
||||
CONFIG["lndhub_enabled"] = True
|
||||
CONFIG["electrs_enabled"] = True
|
||||
CONFIG["explorer_enabled"] = True
|
||||
CONFIG["btcrpcexplorer_enabled"] = True
|
||||
|
||||
# myNode variables
|
||||
LATEST_VERSION_URL = "http://www.mynodebtc.com/device/latest_version"
|
||||
CHECKIN_URL = "http://www.mynodebtc.com/device_api/check_in.php"
|
||||
|
||||
# Bitcoin Variables
|
||||
BITCOIN_ENV_FILE = "/mnt/hdd/mynode/bitcoin/env"
|
||||
BITCOIN_SYNCED_FILE = "/mnt/hdd/mynode/.mynode_bitcoind_synced"
|
||||
|
||||
# LND Variables
|
||||
LND_WALLET_FILE = "/mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/wallet.db"
|
||||
LND_DATA_FOLDER = "/mnt/hdd/mynode/lnd/data/"
|
||||
|
||||
# Other Variables
|
||||
ELECTRS_ENABLED_FILE = "/mnt/hdd/mynode/.mynode_electrs_enabled"
|
||||
LNDHUB_ENABLED_FILE = "/mnt/hdd/mynode/.mynode_lndhub_enabled"
|
||||
BTCRPCEXPLORER_ENABLED_FILE = "/mnt/hdd/mynode/.mynode_btcrpceplorer_enabled"
|
||||
VPN_ENABLED_FILE = "/mnt/hdd/mynode/.mynode_vpn_enabled"
|
|
@ -1,30 +0,0 @@
|
|||
|
||||
CONFIG = {}
|
||||
|
||||
# Device Config
|
||||
CONFIG["device_type"] = "raspi3"
|
||||
|
||||
# Enabled Features
|
||||
CONFIG["rtl_enabled"] = True
|
||||
CONFIG["lndhub_enabled"] = True
|
||||
CONFIG["electrs_enabled"] = True
|
||||
CONFIG["explorer_enabled"] = True
|
||||
CONFIG["btcrpcexplorer_enabled"] = True
|
||||
|
||||
# myNode variables
|
||||
LATEST_VERSION_URL = "http://www.mynodebtc.com/device/latest_version"
|
||||
CHECKIN_URL = "http://www.mynodebtc.com/device_api/check_in.php"
|
||||
|
||||
# Bitcoin Variables
|
||||
BITCOIN_ENV_FILE = "/mnt/hdd/mynode/bitcoin/env"
|
||||
BITCOIN_SYNCED_FILE = "/mnt/hdd/mynode/.mynode_bitcoind_synced"
|
||||
|
||||
# LND Variables
|
||||
LND_WALLET_FILE = "/mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/wallet.db"
|
||||
LND_DATA_FOLDER = "/mnt/hdd/mynode/lnd/data/"
|
||||
|
||||
# Other Variables
|
||||
ELECTRS_ENABLED_FILE = "/mnt/hdd/mynode/.mynode_electrs_enabled"
|
||||
LNDHUB_ENABLED_FILE = "/mnt/hdd/mynode/.mynode_lndhub_enabled"
|
||||
BTCRPCEXPLORER_ENABLED_FILE = "/mnt/hdd/mynode/.mynode_btcrpceplorer_enabled"
|
||||
VPN_ENABLED_FILE = "/mnt/hdd/mynode/.mynode_vpn_enabled"
|
|
@ -1,30 +0,0 @@
|
|||
|
||||
CONFIG = {}
|
||||
|
||||
# Device Config
|
||||
CONFIG["device_type"] = "raspi4"
|
||||
|
||||
# Enabled Features
|
||||
CONFIG["rtl_enabled"] = True
|
||||
CONFIG["lndhub_enabled"] = True
|
||||
CONFIG["electrs_enabled"] = True
|
||||
CONFIG["explorer_enabled"] = True
|
||||
CONFIG["btcrpcexplorer_enabled"] = True
|
||||
|
||||
# myNode variables
|
||||
LATEST_VERSION_URL = "http://www.mynodebtc.com/device/latest_version"
|
||||
CHECKIN_URL = "http://www.mynodebtc.com/device_api/check_in.php"
|
||||
|
||||
# Bitcoin Variables
|
||||
BITCOIN_ENV_FILE = "/mnt/hdd/mynode/bitcoin/env"
|
||||
BITCOIN_SYNCED_FILE = "/mnt/hdd/mynode/.mynode_bitcoind_synced"
|
||||
|
||||
# LND Variables
|
||||
LND_WALLET_FILE = "/mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/wallet.db"
|
||||
LND_DATA_FOLDER = "/mnt/hdd/mynode/lnd/data/"
|
||||
|
||||
# Other Variables
|
||||
ELECTRS_ENABLED_FILE = "/mnt/hdd/mynode/.mynode_electrs_enabled"
|
||||
LNDHUB_ENABLED_FILE = "/mnt/hdd/mynode/.mynode_lndhub_enabled"
|
||||
BTCRPCEXPLORER_ENABLED_FILE = "/mnt/hdd/mynode/.mynode_btcrpceplorer_enabled"
|
||||
VPN_ENABLED_FILE = "/mnt/hdd/mynode/.mynode_vpn_enabled"
|
4
rootfs/standard/usr/bin/mynode-get-device-type
Executable file
4
rootfs/standard/usr/bin/mynode-get-device-type
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
source /usr/share/mynode/mynode_config.sh > /dev/null
|
||||
echo $DEVICE_TYPE
|
|
@ -1,8 +1,5 @@
|
|||
CONFIG = {}
|
||||
|
||||
# Basic Config
|
||||
CONFIG["device_type"] = "rock64"
|
||||
|
||||
# Enabled Features
|
||||
CONFIG["rtl_enabled"] = True
|
||||
CONFIG["electrs_enabled"] = True
|
||||
|
|
|
@ -48,7 +48,8 @@ def get_device_serial():
|
|||
|
||||
|
||||
def get_device_type():
|
||||
return CONFIG["device_type"]
|
||||
device = subprocess.check_output("mynode-get-device-type", shell=True)
|
||||
return device
|
||||
|
||||
|
||||
def is_uploader():
|
||||
|
|
Loading…
Reference in New Issue
Block a user