diff --git a/build/Dockerfile b/build/Dockerfile index a94b532..4228ae5 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -12,8 +12,8 @@ COPY grab_hashes.sh ./grab_hashes.sh RUN ./grab_hashes.sh && cat /usr/src/app/packages-content-hash.csv && \ mkdir -p /usr/src/app/hostScripts && \ - wget -qO /usr/src/app/hostScripts/dappnode_access_credentials.sh https://github.com/dappnode/DAppNode/releases/download/v0.2.44/dappnode_access_credentials.sh && \ - wget -qO /usr/src/app/hostScripts/.dappnode_profile https://github.com/dappnode/DAppNode/releases/download/v0.2.44/dappnode_profile.sh + wget -qO /usr/src/app/hostScripts/dappnode_access_credentials.sh https://github.com/dappnode/DAppNode/releases/download/v0.2.48/dappnode_access_credentials.sh && \ + wget -qO /usr/src/app/hostScripts/.dappnode_profile https://github.com/dappnode/DAppNode/releases/download/v0.2.48/dappnode_profile.sh ENV COMPOSE_IGNORE_ORPHANS true diff --git a/build/upgrades/upgrade_007.sh b/build/upgrades/upgrade_007.sh index 5649ba8..00baee1 100755 --- a/build/upgrades/upgrade_007.sh +++ b/build/upgrades/upgrade_007.sh @@ -9,16 +9,18 @@ DAPPNODE_ACCESS_CREDENTIALS="$HOST_SCRIPTS_DIR/dappnode_access_credentials.sh" DAPPNODE_PROFILE="$DAPPNODE_DNCORE_DIR/.dappnode_profile" LOGS_DIR="$DAPPNODE_DIR/logs" +# IMPORTANT! Profile updated in v0.2.48 # NEW ALIASES in .dappnode_profile # 1. Modify existng profile. New profiles contains alias dappnode_wifi, old ones not -mkdir -p $DAPPNODE_DNCORE_DIR -grep -qF "dappnode_wifi" $DAPPNODE_PROFILE || cp -rf /usr/src/app/hostScripts/.dappnode_profile $DAPPNODE_PROFILE +#mkdir -p $DAPPNODE_DNCORE_DIR +#grep -qF "dappnode_wifi" $DAPPNODE_PROFILE || cp -rf /usr/src/app/hostScripts/.dappnode_profile $DAPPNODE_PROFILE +# IMPORTANT! dappnode_access_credential.sh updated in v0.2.48 # NEW SCRIPT: dappnode_access_credentials.sh -mkdir -p $HOST_SCRIPTS_DIR -[ -f $DAPPNODE_ACCESS_CREDENTIALS ] || cp -rf /usr/src/app/hostScripts/dappnode_access_credentials.sh $DAPPNODE_ACCESS_CREDENTIALS +#mkdir -p $HOST_SCRIPTS_DIR +#[ -f $DAPPNODE_ACCESS_CREDENTIALS ] || cp -rf /usr/src/app/hostScripts/dappnode_access_credentials.sh $DAPPNODE_ACCESS_CREDENTIALS # Call dappnode_access_credentials.sh script on every session -grep -qF "dappnode_access_credentials" $DAPPNODE_PROFILE || sed -i "/return/i /bin/bash $DAPPNODE_ACCESS_CREDENTIALS" $DAPPNODE_PROFILE +#grep -qF "dappnode_access_credentials" $DAPPNODE_PROFILE || sed -i "/return/i /bin/bash $DAPPNODE_ACCESS_CREDENTIALS" $DAPPNODE_PROFILE # LOGS MIGRATION: logs dir was changed to /usr/src/dappnode/logs/ ls -1 *.log &>/dev/null && \ diff --git a/build/upgrades/upgrade_008.sh b/build/upgrades/upgrade_008.sh new file mode 100755 index 0000000..d614dc1 --- /dev/null +++ b/build/upgrades/upgrade_008.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# Upgrade from 0.2.47 to 0.2.48 + +DAPPNODE_DIR="/usr/src/dappnode" +DAPPNODE_ACCESS_CREDENTIALS="${DAPPNODE_DIR}/scripts/dappnode_access_credentials.sh" +DAPPNODE_PROFILE="${DAPPNODE_DIR}/DNCORE/.dappnode_profile" +MOTD="/etc/motd" +WELCOME_MESSAGE="\nChoose a way to connect to your DAppNode, then go to \e[1mhttp://my.dappnode\e[0m\n\n\e[1m- Wifi\e[0m\t\tScan and connect to DAppNodeWIFI. Get wifi credentials with \e[32mdappnode_wifi\e[0m\n\n\e[1m- Local Proxy\e[0m\tConnect to the same router as your DAppNode. Then go to \e[1mhttp://dappnode.local\e[0m\n\n\e[1m- Wireguard\e[0m\tDownload Wireguard app on your device. Get your dappnode wireguard credentials with \e[32mdappnode_wireguard\e[0m\n\n\e[1m- Open VPN\e[0m\tDownload OPen VPN app on your device. Get your openVPN creds with \e[32mdappnode_openvpn\e[0m\n\n\nTo see a full list of commands available execute \e[32mdappnode_help\e[0m\n" + +# 1. Copy new profile v0.2.48 with new aliases +echo "Copying new profile..." +grep -qF "dappnode_help" $DAPPNODE_PROFILE || cp -rf /usr/src/app/hostScripts/.dappnode_profile $DAPPNODE_PROFILE +# Remove return from profile +echo "Removing return from profile..." +sed -i '/return/d' $DAPPNODE_PROFILE + +# 2. New welcome message +echo "Adding welcome message to ${MOTD}..." +[ -f $MOTD ] && { grep -qF "Choose a way to connect to your DAppNode" $MOTD || echo -e "$WELCOME_MESSAGE" >> $MOTD; } + +# 3. Copy new dappnode_access_credentials.script v0.2.48 +echo "Copying new access_credentials script" +[ -f $DAPPNODE_ACCESS_CREDENTIALS ] && grep -qF "line_separator" $DAPPNODE_ACCESS_CREDENTIALS || cp -rf /usr/src/app/hostScripts/dappnode_access_credentials.sh $DAPPNODE_ACCESS_CREDENTIALS \ No newline at end of file diff --git a/dappnode_package.json b/dappnode_package.json index 772d9e7..2941814 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,6 +1,6 @@ { "name": "core.dnp.dappnode.eth", - "version": "0.2.42", + "version": "0.2.48", "description": "DAppNode package responsible for manage the core packages", "type": "dncore", "architectures": ["linux/amd64", "linux/arm64"], @@ -20,9 +20,9 @@ "license": "GPL-3.0", "dependencies": { "bind.dnp.dappnode.eth": "0.2.6", - "ipfs.dnp.dappnode.eth": "0.2.14", - "dappmanager.dnp.dappnode.eth": "0.2.42", - "wifi.dnp.dappnode.eth": "0.2.7" + "ipfs.dnp.dappnode.eth": "0.2.15", + "dappmanager.dnp.dappnode.eth": "0.2.43", + "wifi.dnp.dappnode.eth": "0.2.8" }, "runOrder": ["vpn.dnp.dappnode.eth", "core.dnp.dappnode.eth", "dappmanager.dnp.dappnode.eth"], "changelog": "", diff --git a/docker-compose.yml b/docker-compose.yml index df0c9e3..c90e64f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,9 +7,10 @@ services: core.dnp.dappnode.eth: build: ./build restart: "no" - image: "core.dnp.dappnode.eth:0.2.47" + image: "core.dnp.dappnode.eth:0.2.48" container_name: DAppNodeCore-core.dnp.dappnode.eth volumes: + - "/etc:/etc" - "/usr/src/dappnode/:/usr/src/dappnode/" - "/var/run/docker.sock:/var/run/docker.sock" dns: 172.33.1.2