2018-02-02 04:14:37 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-02-09 03:04:36 +00:00
|
|
|
ISUCS="$(hostname |grep ucs -c)"
|
|
|
|
|
|
|
|
if [ $ISUCS -ne 0 ]; then
|
|
|
|
echo "Do not run this on ucs host. Exiting..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2019-04-21 16:14:47 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#Common to all systems
|
|
|
|
########################################
|
|
|
|
|
|
|
|
|
|
|
|
#Fix timezone
|
|
|
|
|
|
|
|
unlink /etc/localtime
|
|
|
|
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
|
|
|
|
apt -y install htop glances dstat ladvd snmpd ntp tcpdump autofs logwatch molly-guard etckeeper auditd rkhunter rsyslog ngrep screen
|
|
|
|
|
2019-02-25 03:07:14 +00:00
|
|
|
MGMT_INT=$(netstat -rn|grep 0.0.0.0|head -n1|awk '{print $NF}')
|
|
|
|
PFV_MGMT_IP=$(ifconfig $MGMT_INT|grep inet|grep 10.251 -c)
|
|
|
|
OVH_MGMT_IP=$(ifconfig $MGMT_INT|grep inet|grep 10.253 -c)
|
|
|
|
|
|
|
|
if [ $PFV_MGMT_IP -eq 1 ]; then
|
|
|
|
tsysSysLocation=pfv
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $OVH_MGMT_IP -eq 1 ]; then
|
|
|
|
tsysSysLocation=ovh
|
|
|
|
fi
|
|
|
|
|
2019-04-21 16:14:47 +00:00
|
|
|
/usr/local/bin/up2date.sh
|
2019-02-25 01:46:07 +00:00
|
|
|
apt-get update
|
|
|
|
apt-get -y --purge autoremove
|
|
|
|
apt-get -y autoclean
|
|
|
|
apt-get -y upgrade
|
|
|
|
apt-get -y dist-upgrade
|
|
|
|
|
2019-02-25 03:07:14 +00:00
|
|
|
slack tsys-$tsysSysLocation
|