#!/bin/bash
# zy
bt 3;
echo -e "bt over! \n";
sleep 3;
echo -e ".........\n\t";
service ssh restart;
echo -e "ssh over! \n";
/etc/init.d/mysqld restart;
echo -e "MySql over! \n";
/etc/init.d/php-fpm-73 restart;
echo -e "PHP over! \n";
/etc/init.d/redis restart;
echo -e "redis over! \n";
/etc/init.d/httpd restart;
echo -e "httpd over! \n";
while [ "$rumTnux" != 'y' ] && [ "$rumTnux" != 'n' ]
do
read -p "Is Run Tmux. y or n ? " rumTnux;
done
if [ "$rumTnux" == 'y' ]
then
read -p "Tmux Name: " tmuxName;
tmux new -t $tmuxName;
fi
如果报
$'\r': command not found
可以vim sh然后 :set ff=unix 转格式 然后 :wq保存