diff --git a/install.sh b/install.sh index 8bac59a..606056c 100644 --- a/install.sh +++ b/install.sh @@ -24,15 +24,14 @@ fi # set webmaster email address, used below WEBMASTER=webmaster@`hostname -d` -# have packages automatically start/restart/stop after install/upgrade/uninstall if [[ -f /etc/needrestart/needrestart.conf ]]; then - sed -i "s|^#\$nrconf{restart} = 'i';|\$nrconf{restart} = 'a';|g" /etc/needrestart/needrestart.conf # disable kernelhints (no warnings about currently running kernel version) echo '$nrconf{kernelhints} = 0;' > /etc/needrestart/conf.d/kernelhints.conf fi -if [[ -f /usr/sbin/policy-rc.d ]]; then - sed -i "s|exit 101|exit 0|g" /usr/sbin/policy-rc.d -fi + +# set system variables +echo "vm.swappiness = 10" >> /etc/sysctl.d/60-swappiness.conf +/sbin/sysctl --quiet --system # update system DEBIAN_FRONTEND=noninteractive apt-get -y update @@ -44,10 +43,6 @@ DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade DEBIAN_FRONTEND=noninteractive apt-get -y purge snapd cryptsetup ufw iptables landscape-common popularity-contest DEBIAN_FRONTEND=noninteractive apt-get -y autoremove systemctl daemon-reload -## used to disable apparmor, going to try leaving it in now -# aa-teardown -# systemctl stop apparmor -# systemctl disable apparmor # disable motd sed -i 's|ENABLED=1|ENABLED=0|g' /etc/default/motd-news