通过shell脚本分析部署nginx网络服务

要求

1.接收用户部署的服务名称

2.判断服务是否安装

已安装;自定义网站配置路径为/www;并创建共享目录和网页文件;重启服务

没有安装;安装对应的软件包

3.测试

判断服务是否成功运行;

已运行,访问网站

未运行,提示服务未启动,并显示自定义的配置文件内容

4.以上配置没有问题,请邮件告知我,并将脚本代码(代码文件)邮件发送我

我的邮箱账号:lxx1065372838@163.com
代码

已发送邮箱

相关推荐
EverydayJoy^v^5 天前
Linux Shell 高级编程(3)——awk
linux·运维·shell
dingdingfish8 天前
Bash学习 - 第10章:Installing Bash
bash·make·shell·install·configure·5.3
dingdingfish9 天前
Bash学习 - 第8章:Command Line Editing,第6-8节:Programmable Completion
bash·shell·completion·complete·compgen·compopt
白云偷星子10 天前
RHCSA笔记3
shell
dingdingfish10 天前
Bash学习 - 第7章:Job Control
bash·shell·wait·job
dingdingfish10 天前
Bash学习 - 第8章:Command Line Editing,第1-2节:Intro & Readline Interaction
bash·shell·readline
only_Klein11 天前
Shell 三剑客
shell·sed·grep·awk
dingdingfish12 天前
Bash学习 - 第6章:Bash Features,第12节:Shell Compatibility Mode
bash·shell·compat·compatibility
alanesnape12 天前
一个支持在线deBug的编辑器/调试器功能详解
shell·在线编译器·在线debug
dingdingfish12 天前
Bash学习 - 第6章:Bash Features,第10节:The Restricted Shell
bash·shell·rbash·restrict