Shell之预启动脚本
2015-11-30 18:17
525 查看
## preStartApp.sh
#!/bin/sh function startupCrontab() { cat > /var/spool/cron/root << EOF */30 * * * * /usr/donica/script/exportLog.sh */30 * * * * /usr/donica/script/ku/config_log.sh EOF service crond restart } function configSecurity() { if [ -f /usr/donica/script/lampp/db_privileges.sh ]; then sh /usr/donica/script/lampp/db_privileges.sh fi } function configNTP() { if [ -f /usr/donica/script/ntp/config_ntp.sh ]; then sh /usr/donica/script/ntp/config_ntp.sh fi } function configSNMP() { if [ ! -d /usr/local/share/snmp/mibs ]; then mkdir /usr/local/share/snmp/mibs -p chmod 666 /usr/local/share/snmp/mibs -R fi /bin/cp -rf /usr/donica/app/snmp/mibs /usr/local/share/snmp/ } function configNetwork() { /bin/cp -rf /usr/donica/conf/ifcfg-eth0 /etc/sysconfig/network-scripts/ /bin/cp -rf /usr/donica/conf/ifcfg-eth1 /etc/sysconfig/network-scripts/ service network restart } function configDNS() { if [ -f /usr/donica/conf/named.conf ]; then /bin/cp -rf /usr/donica/conf/named.conf /etc/ if [ -d /var/named/chroot/var/etc ]; then /bin/cp -rf /usr/donica/conf/named.conf /var/named/chroot/var/etc fi "preStartApp.sh" 93L, 1973C
相关文章推荐
- Shell之导出数据库的表为Excel的脚本
- Shell之定时拉起脚本
- 一组Linux Shell Scripting小练习
- 监控服务器端口,Down掉会自动重启,并发送邮件 Linux Shell
- linux Shell之cut命令用法
- win linux命令行下写webshell语句
- 让Linux下的cron以秒为单位执行shell脚本的3种方法
- shell知识点01
- Shell基础学习
- ShellSort
- shell 脚本
- powershell启用脚本
- SHELL编程入门(二)---SHELL循环与条件
- 本地代码调用远程shell代码
- shell命令中if语句的后街分号作用
- 如何确保 Shell 脚本只有一个实例运行
- shell 参数
- shell 参数
- shell 引号 转义符 通配符 特殊字符
- 利用Powershell快速导出域控所有用户Hash