Have a nice message about running the postinstall when logging in ssh if yunohost aint installed

This commit is contained in:
Alexandre Aubin 2018-05-09 02:34:02 +02:00
parent 9c161f0b35
commit 0bf50b0def
2 changed files with 30 additions and 0 deletions

View file

@ -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

View file

@ -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