Skip to content

Commit

Permalink
Remove motd script creation
Browse files Browse the repository at this point in the history
  • Loading branch information
dappnodedev committed May 29, 2024
1 parent ff6c650 commit ca0d9fd
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions scripts/dappnode_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ customMotd() {

if [ -d "${UPDATE_MOTD_DIR}" ]; then
# Ubuntu configuration
generateMotdScript
modifyMotdGeneration
fi
}

Expand All @@ -215,9 +215,7 @@ EOF
}

# Ubuntu distros use /etc/update-motd.d/ to generate the motd
generateMotdScript() {

motd_script_file="${UPDATE_MOTD_DIR}/60-dappnode-info"
modifyMotdGeneration() {
disabled_motd_dir="${UPDATE_MOTD_DIR}/disabled"

mkdir -p "${disabled_motd_dir}"
Expand All @@ -231,15 +229,6 @@ generateMotdScript() {
mv "${file}" "${disabled_motd_dir}/"
fi
done

if [ ! -f "${motd_script_file}" ]; then
touch "${motd_script_file}"
fi

chmod +x "${motd_script_file}"

echo "#!/bin/sh" >${motd_script_file}
echo "cat ${MOTD_FILE}" >>${motd_script_file}
}

addSwap() {
Expand Down

0 comments on commit ca0d9fd

Please sign in to comment.