moved old code to modules, cleanup
This commit is contained in:
49
init.sh
49
init.sh
@@ -65,55 +65,6 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# Profile
|
||||
install_profile()
|
||||
{
|
||||
installfile ansi_shadow.flf /usr/share/figlet/ansi_shadow.flf
|
||||
for usr in /root /home/*; do
|
||||
backupdist $usr/{,.}profile $usr/.bashrc
|
||||
installfile {{.,}profile,.bashrc} $usr/
|
||||
done
|
||||
backupdist /etc/motd
|
||||
installfile motd /etc/motd
|
||||
}
|
||||
|
||||
# Supervision
|
||||
patch_snmp()
|
||||
{
|
||||
backupdist /etc/snmp/snmpd.conf /etc/default/snmpd /lib/systemd/system/snmpd.service \
|
||||
/etc/init.d/snmpd
|
||||
installfile snmpd.conf /etc/snmp/snmpd.conf
|
||||
installfile snmpd.init /etc/init.d/snmpd
|
||||
[[ -e /lib/systemd/system/snmpd.service ]] &&
|
||||
installfile snmpd.service /lib/systemd/system/snmpd.service
|
||||
/etc/init.d/snmpd restart || true # error on systemd systems requiring reboot wich we'll do anyway after that script
|
||||
}
|
||||
|
||||
install_mk-agent()
|
||||
{
|
||||
apt install -y $BASEGPDIR/mk_agents/check-mk-agent_${MKVERSION}_all.deb
|
||||
backupdist /etc/xinetd.d/check_mk
|
||||
installfile check_mk /etc/xinetd.d/check_mk
|
||||
/etc/init.d/xinetd restart
|
||||
}
|
||||
|
||||
# Syslog
|
||||
conf_syslog()
|
||||
{
|
||||
backupdist /etc/rsyslog.conf
|
||||
installfile rsyslog.conf /etc/rsyslog.conf
|
||||
/etc/init.d/rsyslog restart
|
||||
}
|
||||
|
||||
# Mail
|
||||
conf_mail()
|
||||
{
|
||||
installfile postfix.cf /etc/postfix/main.cf
|
||||
sed -i -e "s/#HOSTNAME#/$HOSTNAME/g" /etc/postfix/main.cf
|
||||
/etc/init.d/postfix restart
|
||||
}
|
||||
|
||||
|
||||
# ======================
|
||||
# ==== Main Program ====
|
||||
# ======================
|
||||
|
||||
Reference in New Issue
Block a user