26 lines
870 B
Plaintext
26 lines
870 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
# Enable SSH keepalive
|
||
|
sed -i -e 's/^[\s#]*TCPKeepAlive\s.*/TCPKeepAlive yes/' -e 's/^[\s#]*ClientAliveInterval\s.*/ClientAliveInterval 60/' /etc/ssh/sshd_config
|
||
|
echo 'enabled SSH keep alives'
|
||
|
|
||
|
# CgroupsV2
|
||
|
sed -i -e 's/^[\s#]*rc_cgroup_mode=.*/rc_cgroup_mode="unified"/' /etc/rc.conf
|
||
|
echo 'enabled cgroupv2'
|
||
|
|
||
|
# Setup syslog-ng json logging
|
||
|
cp /lib/zdt/syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
|
||
|
cp /lib/zdt/syslog-ng.logrotate.conf /etc/logrotate.d/syslog-ng
|
||
|
|
||
|
mv /etc/periodic/daily/logrotate /etc/periodic/hourly/
|
||
|
echo 'syslog-ng: all to /var/log/messages as json, rotate hourly'
|
||
|
|
||
|
# use init to spawn monit
|
||
|
echo ":2345:respawn:/usr/bin/monit -Ic /etc/monitrc.zdt" >> /etc/inittab
|
||
|
echo 'Enable monit via inittab'
|
||
|
|
||
|
# QoL
|
||
|
mv /etc/profile.d/color_prompt.sh.disabled /etc/profile.d/color_prompt.sh || true
|
||
|
echo 'alias rs="doas bash"' > /etc/profile.d/alias.sh
|
||
|
|