1、脚本包含密码或者主机信息,执行完成以后自动删除脚本

rm -f  `pwd $(dirname $0)`/$0

 2、检查当前用户

# Check if user is root
if [ $(id -u) != "0" ]; then
    echo "Error: You must be root to run this script, please use root to install lnmp"
    exit 1
fi

 

相关文章:

  • 2021-09-25
  • 2022-01-12
  • 2022-02-02
  • 2021-07-09
  • 2022-01-22
  • 2021-10-09
猜你喜欢
  • 2021-08-07
  • 2022-12-23
  • 2021-07-05
  • 2021-12-29
  • 2021-10-04
  • 2022-02-18
  • 2022-01-01
相关资源
相似解决方案