一键启动系统必要服务的脚本
#!/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就是这么简单!
页:
[1]