Add first time script that force resize2fs + message about running the postinstall
This commit is contained in:
parent
e267da5c4d
commit
cc7e29b623
2 changed files with 38 additions and 0 deletions
|
@ -28,6 +28,8 @@ sed -i '/PermitRootLogin/c\PermitRootLogin yes' /etc/ssh/sshd_config
|
|||
echo "root:yunohost" | chpasswd
|
||||
EOF
|
||||
|
||||
install -m 755 files/check_yunohost_is_installed.sh "${ROOTFS_DIR}/etc/profile.d/"
|
||||
|
||||
echo "Cleaning ..."
|
||||
on_chroot << EOF
|
||||
apt-get clean
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -n "$BASH_VERSION" ] && [ "$-" != "${-#*i}" ]; then
|
||||
|
||||
# Trigger resize2fs_once in case it wasnt triggered so far ...
|
||||
if [ -f "/etc/init.d/resize2fs_once" ];
|
||||
then
|
||||
echo "Resizing root partition ... (this may take up to a few minutes)"
|
||||
systemctl restart resize2fs_once
|
||||
fi
|
||||
|
||||
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
|
Loading…
Reference in a new issue