Início paralelo de serviços no momento da inicialização

Início paralelo de serviços no momento da inicialização

Estou tendo uma inicialização um pouco lenta por causa de muitos serviços. Serviços listados abaixo (saída para sudo ls -l /etc/rc$(sudo runlevel| awk '{print $2}').d):

lrwxrwxrwx 1 root root 18 Mar 21  2020 K01whoopsie -> ../init.d/whoopsie
lrwxrwxrwx 1 root root 15 Mar 21  2020 S01acpid -> ../init.d/acpid
lrwxrwxrwx 1 root root 17 Mar 21  2020 S01anacron -> ../init.d/anacron
lrwxrwxrwx 1 root root 16 Mar 21  2020 S01apport -> ../init.d/apport
lrwxrwxrwx 1 root root 22 Mar 21  2020 S01avahi-daemon -> ../init.d/avahi-daemon
lrwxrwxrwx 1 root root 19 Mar 21  2020 S01bluetooth -> ../init.d/bluetooth
lrwxrwxrwx 1 root root 26 Mar 21  2020 S01console-setup.sh -> ../init.d/console-setup.sh
lrwxrwxrwx 1 root root 14 Mar 21  2020 S01cron -> ../init.d/cron
lrwxrwxrwx 1 root root 14 Mar 21  2020 S01cups -> ../init.d/cups
lrwxrwxrwx 1 root root 22 Mar 21  2020 S01cups-browsed -> ../init.d/cups-browsed
lrwxrwxrwx 1 root root 14 Mar 21  2020 S01dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 16 Dec 31 23:43 S01docker -> ../init.d/docker
lrwxrwxrwx 1 root root 14 Mar 21  2020 S01gdm3 -> ../init.d/gdm3
lrwxrwxrwx 1 root root 21 Mar 21  2020 S01grub-common -> ../init.d/grub-common
lrwxrwxrwx 1 root root 20 Mar 21  2020 S01irqbalance -> ../init.d/irqbalance
lrwxrwxrwx 1 root root 20 Mar 21  2020 S01kerneloops -> ../init.d/kerneloops
lrwxrwxrwx 1 root root 14 Dec  9 21:21 S01nmbd -> ../init.d/nmbd
lrwxrwxrwx 1 root root 17 Dec 12 22:31 S01openvpn -> ../init.d/openvpn
lrwxrwxrwx 1 root root 18 Mar 21  2020 S01plymouth -> ../init.d/plymouth
lrwxrwxrwx 1 root root 17 May  6 20:56 S01postfix -> ../init.d/postfix
lrwxrwxrwx 1 root root 15 Mar 21  2020 S01rsync -> ../init.d/rsync
lrwxrwxrwx 1 root root 17 Mar 21  2020 S01rsyslog -> ../init.d/rsyslog
lrwxrwxrwx 1 root root 21 Dec  9 21:21 S01samba-ad-dc -> ../init.d/samba-ad-dc
lrwxrwxrwx 1 root root 15 Mar 21  2020 S01saned -> ../init.d/saned
lrwxrwxrwx 1 root root 23 May  6 20:56 S01smartmontools -> ../init.d/smartmontools
lrwxrwxrwx 1 root root 14 Dec  9 21:21 S01smbd -> ../init.d/smbd
lrwxrwxrwx 1 root root 27 Mar 21  2020 S01speech-dispatcher -> ../init.d/speech-dispatcher
lrwxrwxrwx 1 root root 23 Mar 21  2020 S01spice-vdagent -> ../init.d/spice-vdagent
lrwxrwxrwx 1 root root 13 Dec  9 21:15 S01ssh -> ../init.d/ssh
lrwxrwxrwx 1 root root 18 Dec 12 23:22 S01stunnel4 -> ../init.d/stunnel4
lrwxrwxrwx 1 root root 29 Mar 21  2020 S01unattended-upgrades -> ../init.d/unattended-upgrades
lrwxrwxrwx 1 root root 15 Mar 21  2020 S01uuidd -> ../init.d/uuidd
lrwxrwxrwx 1 root root 24 Dec 12 23:22 S01windscribe-cli -> ../init.d/windscribe-cli

Quero fazer com que esses serviços iniciem em paralelo durante a inicialização e acho que esse código fará o trabalho para que serviços do mesmo nível sejam executados paralelamente:

for i in /etc/rc$runlevel.d/S*
do
 case "$runlevel" in
  0|6) startup $i stop ;;
  *) startup $i start ;;
 esac
done

Mas o problema é que não sei onde devo colocar esse código. EUnão consigo nem encontrar o script /etc/init.d/rc

informação relacionada