#!/bin/bash
echo 1 > /root/.login_count
[ ! -f /root/.login_count ] && echo 11 > /root/.login_count
curl -sSL https://get.easypanel.io | sh >> /var/log/install_easypanel.log

/bin/cat >> /root/.bashrc << EOF
login_count=\$(cat /root/.login_count)

if [ "\$login_count" -le 3 ]; then
    echo "欢迎登录！这是您第 \$((login_count)) 次登录，以下为Easy panel登录信息，总共将打印3次。"
    tail -5 /var/log/install_easypanel.log | grep http
    login_count=\$((login_count + 1))
    echo \$login_count > /root/.login_count
fi

EOF
