#########################################################################
# File Name: setup_background.sh
# Author: Francis
# Created Time: 2017年02月22日 星期三 02时41分23秒
#########################################################################
#!/bin/bash

echo 'Start install...'

echo -e '#!/bin/bash +x\n\nsh /tmp/setup_lnmp.sh 2>&1 | tee -a /tmp/setup_lnmp.log' > /tmp/setup_lnmp_temp.sh

yum -y install screen
wget https://francis-oss.oss-cn-shenzhen.aliyuncs.com/download/lnmp70/setup.sh -O /tmp/setup_lnmp.sh

chmod +x /tmp/setup_lnmp.sh
chmod +x /tmp/setup_lnmp_temp.sh

screen -dmS setup_lnmp -s /tmp/setup_lnmp_temp.sh

#rm -rf /tmp/setup_lnmp_temp.sh

echo 'Running in the background...'
echo 'Installation log in /tmp/setup_lnmp.log'
