#!/bin/bash

#lock detection
echo "<<=========== install tools部署[开始] ==========>>"
date '+时间 : %Y-%m-%d %H:%M:%S' >> /home/start.log
echo "<<=========== install tools部署[开始] ==========>>" >> /home/start.log
echo "##########" >> /home/start.log

LOCK_NAME="/tmp/winit.lock"
if (set -o noclobber ; echo "" > ${LOCK_NAME} ) 2> /dev/null;then
	echo "init start";
	echo "init start-1" >> /home/start.log
else
	echo "init err"
	echo "init err" >> /home/stop.log
	exit 1;
fi

#start install
apt-get update
apt-get upgrade -y
apt-get install ssh -y
apt-get install vim -y
apt-get install p7zip-full -y
apt-get install lrzsz -y
apt-get install sshpass -y
apt-get install tree -y
apt-get install htop -y
apt-get install curl -y
apt-get install ntpdate -y
apt-get install redis-server -y
apt-get install sshpass -y

echo "instaall tools ok" 
echo "instaall tools ok" >> /home/start.log
