首页 > 其他 > 详细

一键启动系统必要服务的脚本

时间:2015-03-26 18:05:41      阅读:155      评论:0      收藏:0      [点我收藏+]
#!/bin/sh
#Autor:ley
#Date:xxx
#Email:xxx
#Connent:start the system services

LANG=en
for name in `chkconfig --list|grep 3:on|awk ‘{print $1}‘`
do
  chkconfig$name off
done
for name in rsyslog network crond sshd sysstat 
do
  chkconfig$name on
done

#大概逻辑是:
1.第一个for循环查找出目前开启的服务,然后进行全部关闭!
2.第二个for循环是开始必要的几个服务(rsyslog network crond sshd sysstat)
  其实shell就是这么简单!


本文出自 “小虾” 博客,请务必保留此出处http://liangey.blog.51cto.com/9097868/1625042

一键启动系统必要服务的脚本

原文:http://liangey.blog.51cto.com/9097868/1625042

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!