diff --git a/rootfs/debian/var/www/mynode/config.py b/rootfs/debian/var/www/mynode/config.py deleted file mode 100644 index 6e4d8422..00000000 --- a/rootfs/debian/var/www/mynode/config.py +++ /dev/null @@ -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" diff --git a/rootfs/raspi3/var/www/mynode/config.py b/rootfs/raspi3/var/www/mynode/config.py deleted file mode 100644 index 21fd00a1..00000000 --- a/rootfs/raspi3/var/www/mynode/config.py +++ /dev/null @@ -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" diff --git a/rootfs/raspi4/var/www/mynode/config.py b/rootfs/raspi4/var/www/mynode/config.py deleted file mode 100644 index 525898b1..00000000 --- a/rootfs/raspi4/var/www/mynode/config.py +++ /dev/null @@ -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" diff --git a/rootfs/standard/usr/bin/mynode-get-device-type b/rootfs/standard/usr/bin/mynode-get-device-type new file mode 100755 index 00000000..5bfe05d7 --- /dev/null +++ b/rootfs/standard/usr/bin/mynode-get-device-type @@ -0,0 +1,4 @@ +#!/bin/bash + +source /usr/share/mynode/mynode_config.sh > /dev/null +echo $DEVICE_TYPE \ No newline at end of file diff --git a/rootfs/standard/var/www/mynode/config.py b/rootfs/standard/var/www/mynode/config.py index 9d537ea3..a9990d1d 100644 --- a/rootfs/standard/var/www/mynode/config.py +++ b/rootfs/standard/var/www/mynode/config.py @@ -1,8 +1,5 @@ CONFIG = {} -# Basic Config -CONFIG["device_type"] = "rock64" - # Enabled Features CONFIG["rtl_enabled"] = True CONFIG["electrs_enabled"] = True diff --git a/rootfs/standard/var/www/mynode/device_info.py b/rootfs/standard/var/www/mynode/device_info.py index c1fba66d..9a0ca55e 100644 --- a/rootfs/standard/var/www/mynode/device_info.py +++ b/rootfs/standard/var/www/mynode/device_info.py @@ -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():