diff --git a/apps/ride-the-lightning/docker-compose.yml b/apps/ride-the-lightning/docker-compose.yml index e6f7489..e435b1d 100644 --- a/apps/ride-the-lightning/docker-compose.yml +++ b/apps/ride-the-lightning/docker-compose.yml @@ -13,8 +13,10 @@ services: - ${APP_DATA_DIR}/loop:/loop - ${LND_DATA_DIR}:/lnd:ro - ${BITCOIN_DATA_DIR}:/bitcoin:ro + entrypoint: /data/entrypoint.sh environment: # App config + APP_PASSWORD: $APP_PASSWORD PORT: $APP_RIDE_THE_LIGHTNING_PORT RTL_CONFIG_PATH: "/data" CHANNEL_BACKUP_PATH: "/data/backup" diff --git a/apps/ride-the-lightning/rtl/RTL-Config.json b/apps/ride-the-lightning/rtl/RTL-Config.json index 2d06542..10a427d 100644 --- a/apps/ride-the-lightning/rtl/RTL-Config.json +++ b/apps/ride-the-lightning/rtl/RTL-Config.json @@ -1,6 +1,5 @@ { - "# TODO:": "APP_PASSWORD", - "multiPass": "moneyprintergobrrr", + "multiPass": "$APP_PASSWORD", "defaultNodeIndex": 1, "SSO": { "rtlSSO": 0, diff --git a/apps/ride-the-lightning/rtl/entrypoint.sh b/apps/ride-the-lightning/rtl/entrypoint.sh new file mode 100755 index 0000000..17829d1 --- /dev/null +++ b/apps/ride-the-lightning/rtl/entrypoint.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Migrate legacy default password +sed -i 's/"multiPassHashed": "70c882380045d35807b45245bd49185991904ff47a5036dfe82103c49f9f0f31"/"multiPass": "'${APP_PASSWORD}'"/' $RTL_CONFIG_PATH/RTL-Config.json +sed -i 's/"multiPass": "moneyprintergobrrr"/"multiPass": "'${APP_PASSWORD}'"/' $RTL_CONFIG_PATH/RTL-Config.json + +# Migrate new password placeholder +sed -i 's/$APP_PASSWORD/'${APP_PASSWORD}'/' $RTL_CONFIG_PATH/RTL-Config.json + +exec /sbin/tini -g -- node rtl \ No newline at end of file diff --git a/scripts/update/01-run.sh b/scripts/update/01-run.sh index 551b4e8..044c3fd 100755 --- a/scripts/update/01-run.sh +++ b/scripts/update/01-run.sh @@ -218,6 +218,15 @@ if [[ -d "${samourai_app_dojo_tor_dir}" ]] && [[ ! -d "${samourai_app_new_dojo_t mv "${samourai_app_dojo_tor_dir}/" "${samourai_app_new_dojo_tor_dir}" fi +# Handle updating entrypoint for ride-the-lightning app +rtl_data_dir="${UMBREL_ROOT}/app-data/ride-the-lightning" +rtl_data_entrypoint="${rtl_data_dir}/rtl/entrypoint.sh" +rtl_app_entrypoint="${UMBREL_ROOT}/apps/ride-the-lightning/rtl/entrypoint.sh" +if [[ -d "${rtl_data_dir}" ]]; then + echo "Found ride-the-lightning install, attempting to update entrypoint..." + cp "${rtl_app_entrypoint}" "${rtl_data_entrypoint}" +fi + # Fix permissions echo "Fixing permissions" find "$UMBREL_ROOT" -path "$UMBREL_ROOT/app-data" -prune -o -exec chown 1000:1000 {} +