diff --git a/stage3/00-install-yunohost/00-run.sh b/stage3/00-install-yunohost/00-run.sh index 2704081..a731014 100755 --- a/stage3/00-install-yunohost/00-run.sh +++ b/stage3/00-install-yunohost/00-run.sh @@ -17,6 +17,8 @@ echo "root:yunohost" | chpasswd chage -d 0 root EOF +install -m 755 files/check_yunohost_is_installed.sh "${ROOTFS_DIR}/etc/profile.d/" + echo "Cleaning ..." on_chroot << EOF apt-get clean diff --git a/stage3/00-install-yunohost/files/check_yunohost_is_installed.sh b/stage3/00-install-yunohost/files/check_yunohost_is_installed.sh new file mode 100644 index 0000000..45cdf00 --- /dev/null +++ b/stage3/00-install-yunohost/files/check_yunohost_is_installed.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +if [ -n "$BASH_VERSION" ] && [ "$-" != "${-#*i}" ]; then + if [ ! -f "/etc/yunohost/installed" ]; + then + normal=$(printf '\033[0m') + bold=$(printf '\033[1m') + blue=$(printf '\033[34m') + + IPS=$(hostname --all-ip-address | sed 's/ /\n /g') + cat << EOF +====================================================================== +${bold}${blue} + Congratulations on setting up your YunoHost server ! +${normal}${bold} + To finish the installation, you should run the postinstallation. + You can find documentation about it on :${normal} + https://yunohost.org/postinstall +${normal}${bold} + You can run it from the command line interface with :${normal} + $ yunohost tools postinstall +${normal}${bold} + Or from a browser by accessing one of your local IP :${normal} + $IPS${normal} +====================================================================== +EOF + fi +fi