Compare commits

..

No commits in common. "98049faf683562d6da7cb2da92723976f55ce663" and "a5b5dd3e8261a76787c4674d0099d997e38ff55d" have entirely different histories.

9 changed files with 289 additions and 275 deletions

View File

@ -39,9 +39,10 @@ alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases alias_database = hash:/etc/aliases
myorigin = /etc/mailname myorigin = /etc/mailname
mydestination = pfv-vpn.turnsys.net, $myhostname, pfv-vpn, localhost.localdomain, localhost mydestination = pfv-vpn.turnsys.net, $myhostname, pfv-vpn, localhost.localdomain, localhost
relayhost = pfv-mail.turnsys.net relayhost = pfv-toolbox.turnsys.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0 mailbox_size_limit = 0
recipient_delimiter = + recipient_delimiter = +
inet_interfaces = all inet_interfaces = all
inet_protocols = all inet_protocols = all

View File

@ -1,4 +1,5 @@
[stream] [stream]
enabled = yes enabled = yes
destination = conhost.turnsys.net:19999 destination = pfv-toolbox.turnsys.net:19999
api key = 6ed9e20a-c819-4ebc-b894-322eb0710d03 api key = 6ed9e20a-c819-4ebc-b894-322eb0710d03

View File

@ -34,7 +34,7 @@ function global-configureAptRepos()
echo "Now running $FUNCNAME...." echo "Now running $FUNCNAME...."
echo "deb http://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list echo "deb http://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list
curl --insecure -s https://webmin.com/jcameron-key.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/jcameron-key.gpg curl --insecure -s https://www.webmin.com/jcameron-key.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/jcameron-key.gpg
echo "deb https://packages.cisofy.com/community/lynis/deb/ stable main" > /etc/apt/sources.list.d/cisofy-lynis.list echo "deb https://packages.cisofy.com/community/lynis/deb/ stable main" > /etc/apt/sources.list.d/cisofy-lynis.list
curl --insecure -s https://packages.cisofy.com/keys/cisofy-software-public.key | apt-key add - curl --insecure -s https://packages.cisofy.com/keys/cisofy-software-public.key | apt-key add -
@ -50,8 +50,9 @@ function global-shellScripts()
echo "Now running $FUNCNAME...." echo "Now running $FUNCNAME...."
cp distro /usr/local/bin/distro && chmod +x /usr/local/bin/distro curl -s http://dl.turnsys.net/distro > /usr/local/bin/distro ; chmod +x /usr/local/bin/distro
cp up2date.sh /usr/local/bin/up2date.sh && chmod +x /usr/local/bin/up2date.sh curl -s http://dl.turnsys.net/upsnotify.sh > /usr/local/bin/upsnotify.sh ; chmod +x /usr/local/bin/upsnotify.sh
curl -s http://dl.turnsys.net/up2date.sh > /usr/local/bin/up2date.sh ; chmod +x /usr/local/bin/up2date.sh
echo "Completed running $FUNCNAME" echo "Completed running $FUNCNAME"
@ -62,8 +63,9 @@ function global-profileScripts()
echo "Now running $FUNCNAME...." echo "Now running $FUNCNAME...."
cp profiled-tsys-shell.sh /etc/profile.d/tsys-shell.sh curl -s http://dl.turnsys.net/profiled-tsys-shell.sh > /etc/profile.d/tsys-shell.sh
cp profiled-tmux.sh /etc/profile.d/tmux.sh curl -s http://dl.turnsys.net/profiled-tmux.sh > /etc/profile.d/tmux.sh
curl -s http://dl.turnsys.net/profiled-notify-discord.sh > /etc/profile.d/login-notify-discord.sh
echo "Completed running $FUNCNAME" echo "Completed running $FUNCNAME"
@ -77,9 +79,8 @@ function global-oam()
echo "Now running $FUNCNAME...." echo "Now running $FUNCNAME...."
rm -rf /usr/local/librenms-agent rm -rf /usr/local/librenms-agent
cp librenms.tar.gz /usr/local/librenms.tar.gz curl -s http://dl.turnsys.net/librenms.tar.gz > /usr/local/librenms.tar.gz
cd /usr/local && tar xfz librenms.tar.gz && rm -f /usr/local/librenms.tar.gz cd /usr/local ; tar xfz librenms.tar.gz ; rm -f /usr/local/librenms.tar.gz
cd -
echo "Completed running $FUNCNAME" echo "Completed running $FUNCNAME"
@ -87,9 +88,9 @@ echo "Completed running $FUNCNAME"
if [[ ! -f /root/ntpserver ]]; then if [[ ! -f /root/ntpserver ]]; then
cp ntp.conf /etc/ntp.conf curl -s http://dl.turnsys.net/ntp.conf > /etc/ntp.conf
export DEBIAN_FRONTEND="noninteractive" && apt-get -qq --yes -o Dpkg::Options::="--force-confold" install ntp ntpdate export DEBIAN_FRONTEND="noninteractive" && apt-get -qq --yes -o Dpkg::Options::="--force-confold" install ntp ntpdate
systemctl stop ntp && ntpdate pfv-dc-02.turnsys.net && systemctl start ntp systemctl stop ntp ; ntpdate pfv-dc-02.turnsys.net ; systemctl start ntp
fi fi
function global-systemServiceConfigurationFiles() function global-systemServiceConfigurationFiles()
@ -99,22 +100,16 @@ function global-systemServiceConfigurationFiles()
echo "Now running $FUNCNAME...." echo "Now running $FUNCNAME...."
cp aliases /etc/aliases curl -s http://dl.turnsys.net/aliases > /etc/aliases
cp rsyslog.conf /etc/rsyslog.conf curl -s http://dl.turnsys.net/rsyslog.conf > /etc/rsyslog.conf
#Need to root cause why this breaks DNS.... look in legacy code to find DNS handle/fix bits and merge here...
#curl -s http://dl.turnsys.net/resolv.conf > /etc/resolv.conf #curl -s http://dl.turnsys.net/resolv.conf > /etc/resolv.conf
curl -s http://dl.turnsys.net/nsswitch.conf > /etc/nsswitch.conf
cp nsswitch.conf /etc/nsswitch.conf
if [ ! -d /root/.ssh ]; then if [ ! -d /root/.ssh ]; then
mkdir /root/.ssh/ mkdir /root/.ssh/
fi fi
curl -s http://dl.turnsys.net/ssh-authorized-keys > /root/.ssh/authorized_keys ; chmod 400 /root/.ssh/authorized_keys
if [ ! -L /root/.ssh/authorized_keys ]; then
cp ssh-authorized-keys /root/.ssh/authorized_keys && chmod 400 /root/.ssh/authorized_keys
fi
echo "Completed running $FUNCNAME" echo "Completed running $FUNCNAME"
@ -146,8 +141,8 @@ export DEBIAN_FRONTEND="noninteractive" && apt-get -qq --yes -o Dpkg::Options::=
MAIL_HOST="$(hostname -f)" MAIL_HOST="$(hostname -f)"
debconf-set-selections <<< "postfix postfix/mailname string $MAIL_HOST" debconf-set-selections <<< "postfix postfix/mailname string $MAIL_HOST"
debconf-set-selections <<< "postfix postfix/main_mailer_type string Internet with smarthost" debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet with smarthost'"
debconf-set-selections <<< "postfix postfix/relayhost string pfv-toolbox.turnsys.net" debconf-set-selections <<< "postfix postfix/relayhost string 'pfv-toolbox.turnsys.net'"
export DEBIAN_FRONTEND="noninteractive" && apt-get -qq --yes -o Dpkg::Options::="--force-confold" install \ export DEBIAN_FRONTEND="noninteractive" && apt-get -qq --yes -o Dpkg::Options::="--force-confold" install \
htop \ htop \
@ -156,6 +151,7 @@ snmpd \
ncdu \ ncdu \
iftop \ iftop \
acct \ acct \
glances \
nethogs \ nethogs \
sysstat \ sysstat \
ngrep \ ngrep \
@ -190,8 +186,9 @@ telnet \
postfix \ postfix \
webmin webmin
bash <(curl -Ss https://my-netdata.io/kickstart.sh) --dont-wait bash <(curl -Ss https://my-netdata.io/kickstart.sh) --dont-wait
cp netdata-stream.conf /opt/netdata/etc/netdata && systemctl stop netdata && systemctl start netdata curl -s http://dl.turnsys.net/netdata-stream.conf > /etc/netdata/stream.conf ; systemctl stop netdata ; systemctl start netdata
echo "Completed running $FUNCNAME" echo "Completed running $FUNCNAME"
@ -204,12 +201,12 @@ function global-postPackageConfiguration()
echo "Now running $FUNCNAME...." echo "Now running $FUNCNAME...."
###Post package deployment bits ###Post package deployment bits
systemctl stop snmpd && /etc/init.d/snmpd stop systemctl stop snmpd ; /etc/init.d/snmpd stop
sed -i "s|-Lsd|-LS6d|" /lib/systemd/system/snmpd.service sed -i "s|-Lsd|-LS6d|" /lib/systemd/system/snmpd.service
cp snmpd.conf /etc/snmp/snmpd.conf curl -s http://dl.turnsys.net/snmpd.conf > /etc/snmp/snmpd.conf
systemctl daemon-reload && systemctl restart snmpd && /etc/init.d/snmpd restart systemctl daemon-reload ; systemctl restart snmpd ; /etc/init.d/snmpd restart
systemctl stop rsyslog && systemctl start rsyslog && logger "hi hi from $(hostname)" /etc/init.d/rsyslog stop ; /etc/init.d/rsyslog start ; logger "hi hi from $(hostname)"
systemctl restart ntp systemctl restart ntp
systemctl restart postfix systemctl restart postfix

View File

@ -109,10 +109,7 @@ curl -s http://dl.turnsys.net/nsswitch.conf > /etc/nsswitch.conf
if [ ! -d /root/.ssh ]; then if [ ! -d /root/.ssh ]; then
mkdir /root/.ssh/ mkdir /root/.ssh/
fi fi
if [ ! -L /root/.ssh/authorized_keys ]; then
curl -s http://dl.turnsys.net/ssh-authorized-keys > /root/.ssh/authorized_keys ; chmod 400 /root/.ssh/authorized_keys curl -s http://dl.turnsys.net/ssh-authorized-keys > /root/.ssh/authorized_keys ; chmod 400 /root/.ssh/authorized_keys
fi
echo "Completed running $FUNCNAME" echo "Completed running $FUNCNAME"
@ -154,6 +151,7 @@ snmpd \
ncdu \ ncdu \
iftop \ iftop \
acct \ acct \
glances \
nethogs \ nethogs \
sysstat \ sysstat \
ngrep \ ngrep \

13
prox.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
rm -f /etc/apt/sources.list.d/*
echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
chmod +r /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg # optional, if you have a non-default umask
apt update && apt -y full-upgrade
apt-get -y install ifupdown2 ipmitool ethtool net-tools lshw
curl -s http://dl.turnsys.net/newSrv.sh|/bin/bash

View File

@ -1,9 +1,13 @@
#!/bin/bash #!/bin/bash
rm -f /etc/apt/sources.list.d/* rm -f /etc/apt/sources.list.d/*
echo "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list echo "deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
wget http://download.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
chmod +r /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg # optional, if you have a non-default umask
apt update && apt -y full-upgrade apt update && apt -y full-upgrade
apt-get -y install ifupdown2 ipmitool ethtool net-tools lshw apt-get -y install ifupdown2 ipmitool ethtool net-tools lshw
#curl -s http://dl.turnsys.net/newSrv.sh|/bin/bash #curl -s http://dl.turnsys.net/newSrv.sh|/bin/bash

View File

@ -37,4 +37,4 @@ extend serial '/bin/cat /sys/devices/virtual/dmi/id/product_serial'
# Allow Systems Management Data Engine SNMP to connect to snmpd using SMUX # Allow Systems Management Data Engine SNMP to connect to snmpd using SMUX
# smuxpeer .1.3.6.1.4.1.674.10892.1 smuxpeer .1.3.6.1.4.1.674.10892.1