readd policy-rc.d stuff, needed to allow autorestartup of installed services

This commit is contained in:
Matthew Saunders Brown 2024-03-05 12:14:57 -08:00
parent fffed612cb
commit fc633b6b9b

View File

@ -24,6 +24,10 @@ fi
# set webmaster email address, used below
WEBMASTER=webmaster@`hostname -d`
# if policy-rc.d is installed configure it to allow all packages to automatically start/restart/stop after install/upgrade/uninstall
if [[ -f /usr/sbin/policy-rc.d ]]; then
echo -e '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d
fi
# set needrestart to list only, which is also default for unattended upgrades
if [[ -f /etc/needrestart/needrestart.conf ]]; then
sed -i "s|^#\$nrconf{restart} = 'i';|\$nrconf{restart} = 'l';|g" /etc/needrestart/needrestart.conf