File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,5 +10,6 @@ ssv-config.yaml.bak
1010blox-ssv-config.yaml
1111blox-ssv-config.yaml.bak
1212.nada
13+ .motd
1314post-ethd-update.sh
1415pre-ethd-update.sh
File renamed without changes.
Original file line number Diff line number Diff line change @@ -473,6 +473,10 @@ __check_compose_version() {
473473
474474
475475__prep_conffiles () {
476+ # Create .motd if it doesn't exist
477+ if [[ ! -f ./.motd ]]; then
478+ ${__as_owner} cp ./.motd.sample ./.motd
479+ fi
476480# Create prometheus.yml if it doesn't exist
477481 if [[ ! -f ./prometheus/prometheus.yml ]]; then
478482 ${__as_owner} cp ./prometheus/prometheus.yml.sample ./prometheus/prometheus.yml
816820
817821install () {
818822 local yn
823+ local project_dir
819824
820825 if [[ ! " ${__distro} " =~ (ubuntu| debian) ]]; then
821826 echo " ${__project_name} does not know how to install Docker on ${__distro} "
@@ -869,8 +874,14 @@ install() {
869874 [Nn]* ) return 0;;
870875 * ) ;;
871876 esac
877+ project_dir=$( dirname " $( realpath " ${BASH_SOURCE[0]} " ) " )
872878 echo " alias ethd=$( realpath " ${BASH_SOURCE[0]} " ) " >> ~/.profile
873- echo " cat $( dirname " $( realpath " ${BASH_SOURCE[0]} " ) " ) /.motd" >> ~/.profile
879+ echo " cat ${project_dir} /.motd" >> ~/.profile
880+ if [[ ! -f ./.motd ]]; then # Also in prep_conffiles, be doubly sure
881+ ${__as_owner} cp ./.motd.sample .motd
882+ fi
883+ ${__as_owner} sed -i' .original' " s|~/eth-docker|${project_dir// &/ \\ &} |" ./.motd
884+ ${__as_owner} rm -f ./.motd.original
874885 echo " Go ahead and 'source ~/.profile' or log out and back in."
875886 echo " After that, you can use the command 'ethd'."
876887 fi
You can’t perform that action at this time.
0 commit comments