diff --git a/rootfs/standard/opt/mynode/custom/logo_custom.png b/rootfs/standard/opt/mynode/custom/logo_custom.png new file mode 100644 index 00000000..d8797b75 Binary files /dev/null and b/rootfs/standard/opt/mynode/custom/logo_custom.png differ diff --git a/rootfs/standard/opt/mynode/custom/logo_dark_custom.png b/rootfs/standard/opt/mynode/custom/logo_dark_custom.png new file mode 100644 index 00000000..f1813a1f Binary files /dev/null and b/rootfs/standard/opt/mynode/custom/logo_dark_custom.png differ diff --git a/rootfs/standard/usr/bin/mynode_startup.sh b/rootfs/standard/usr/bin/mynode_startup.sh index db133c5e..b6676a10 100755 --- a/rootfs/standard/usr/bin/mynode_startup.sh +++ b/rootfs/standard/usr/bin/mynode_startup.sh @@ -58,6 +58,21 @@ if [ ! -f /var/lib/mynode/.expanded_rootfs ]; then fi fi +# Customize logo for resellers +if [ -f /opt/mynode/custom/reseller ]; then + if [ -f /opt/mynode/custom/logo_custom.png ]; then + cp -f /opt/mynode/custom/logo_custom.png /var/www/mynode/static/images/logo.png + else + cp -f /var/www/mynode/static/images/logo_original.png /var/www/mynode/static/images/logo.png + fi + if [ -f /opt/mynode/custom/logo_dark_custom.png ]; then + cp -f /opt/mynode/custom/logo_dark_custom.png /var/www/mynode/static/images/logo_dark.png + else + cp -f /var/www/mynode/static/images/logo_dark_original.png /var/www/mynode/static/images/logo_dark.png + fi +fi + + # Verify we are in a clean state if [ $IS_RASPI -eq 1 ] || [ $IS_ROCKPRO64 -eq 1 ]; then dphys-swapfile swapoff || true diff --git a/rootfs/standard/var/www/mynode/device_info.py b/rootfs/standard/var/www/mynode/device_info.py index 806d7a38..a95f61c9 100644 --- a/rootfs/standard/var/www/mynode/device_info.py +++ b/rootfs/standard/var/www/mynode/device_info.py @@ -165,6 +165,12 @@ def get_recent_upgrade_logs(): pass return logs +#================================== +# Reseller Info +#================================== +def is_device_from_reseller(): + return os.path.isfile("/opt/mynode/custom/reseller") + #================================== # Device Info diff --git a/rootfs/standard/var/www/mynode/mynode.py b/rootfs/standard/var/www/mynode/mynode.py index c149fde1..573300a2 100644 --- a/rootfs/standard/var/www/mynode/mynode.py +++ b/rootfs/standard/var/www/mynode/mynode.py @@ -466,6 +466,7 @@ def index(): "lnd_ready": lnd_ready, "tor_status_color": tor_status_color, "is_installing_docker_images": is_installing_docker_images(), + "is_device_from_reseller": is_device_from_reseller(), "electrs_status_color": electrs_status_color, "electrs_status": Markup(electrs_status), "electrs_enabled": is_electrs_enabled(), diff --git a/rootfs/standard/var/www/mynode/static/images/logo_dark_original.png b/rootfs/standard/var/www/mynode/static/images/logo_dark_original.png new file mode 100644 index 00000000..895e3720 Binary files /dev/null and b/rootfs/standard/var/www/mynode/static/images/logo_dark_original.png differ diff --git a/rootfs/standard/var/www/mynode/static/images/logo_original.png b/rootfs/standard/var/www/mynode/static/images/logo_original.png new file mode 100644 index 00000000..b2079f7d Binary files /dev/null and b/rootfs/standard/var/www/mynode/static/images/logo_original.png differ diff --git a/rootfs/standard/var/www/mynode/templates/includes/apps.html b/rootfs/standard/var/www/mynode/templates/includes/apps.html index c394ccef..50516b42 100644 --- a/rootfs/standard/var/www/mynode/templates/includes/apps.html +++ b/rootfs/standard/var/www/mynode/templates/includes/apps.html @@ -73,6 +73,7 @@ {% endif %} + {% if not is_device_from_reseller %}
@@ -107,6 +108,7 @@
+ {% endif %}