Files
StateGrid/install_shell/other.sh
Qin, Bo f9f4545b3e remove linx-watch-top.sh
deleted:    install_shell/linx-watch-top.sh
	modified:   install_shell/other.sh

Signed-off-by: Qin, Bo <bqin@linx-info.com>
2014-04-22 15:26:59 +08:00

56 lines
1.8 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
. ./check_function.sh
USER_NAME=$1
USER_HOME=$2
USER_SHELL=$3
#解决从无root内核启动后日志轮转和与时间服务器校时的cron定时任务的用户为sysadmin
#解决d5000等用户家目录下.xsession-errors文件删除的问题
cp crontab /etc/
sed -i "s#d5000#${USER_NAME}#g" /etc/crontab
chown sysadmin.sysadmin /etc/crontab
chmod 644 /etc/crontab
cp xrm.sh /usr/sbin
chown root.root /usr/sbin/xrm.sh
chmod 755 /usr/sbin/xrm.sh
if [ -f /var/spool/cron/crontabs/root ];then
rm /var/spool/cron/crontabs/root
fi
#恢复被netkit-base包覆盖的/etc/inetd.conf文件
cp inetd.conf /etc
chown root.root /etc/inetd.conf
chmod 644 /etc/inetd.conf
chown -R sysadmin.sysadmin /etc/cron/daily/
#chown -R audadmin.audadmin /etc/cron/weekly/
chown sysadmin.sysadmin /etc/logrotate.conf
touch /var/lib/logrotate.status
chown sysadmin.sysadmin /var/lib/logrotate.status
chmod 755 /usr/sbin/runjobs
#解决定时抓取占用最大内存的进程名,并记录到/var/log/messages文件中
cp get_max_mem_process.sh /usr/sbin/
chown sysadmin.sysadmin /usr/sbin/get_max_mem_process.sh
chmod 755 /usr/sbin/get_max_mem_process.sh
#获取系统的部分日志或全部日志及系统相关信息的脚本
cp get_parameter_log.sh /usr/sbin/
cp check_sec_local.sh /usr/sbin
cp os.sh /usr/sbin
cp pci.ids /usr/share
chown sysadmin.sysadmin /usr/sbin/get_parameter_log.sh
chmod 755 /usr/sbin/get_parameter_log.sh
chown sysadmin.sysadmin /usr/sbin/check_sec_local.sh
chmod 755 /usr/sbin/check_sec_local.sh
chown sysadmin.sysadmin /usr/sbin/os.sh
chmod 755 /usr/sbin/os.sh
cp LinxSetupSign /etc/security
echo "setup time">>/etc/security/LinxSetupSign
date>>/etc/security/LinxSetupSign
chown netadmin.netadmin /etc/rc.d/rc.local
touch /var/log/corosync.log
chown audadmin.audadmin /var/log/corosync.log