mp_doc:imain_install_tips
Это старая версия документа!
Различные советы и секреты по установке ОС
Заставляем работать rc.local на Debian >9 или Ubuntu
Создадим файл сервиса:
mcedit /etc/systemd/system/rc-local.service
Со следующим содержимым:
[Unit] Description=/etc/rc.local ConditionPathExists=/etc/rc.local [Service] Type=idle ExecStart=/etc/rc.local start TimeoutSec=0 StandardOutput=tty RemainAfterExit=yes [Install] WantedBy=multi-user.target
Создадим сам rc.local:
mcedit /etc/rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. exit 0
Добавим права на выполнение:
chmod +x /etc/rc.local
Добавим сервис в автозапуск:
systemctl enable rc-local
Запускаем сервис:
systemctl start rc-local
Смотрим состояние сервиса:
systemctl status rc-local
mp_doc/imain_install_tips.1670643555.txt.gz · Последнее изменение: 2024/03/31 22:04 (внешнее изменение)