1
Linux/Unix / Debian 10 вернуть rc.local
« : 24 Февраля 2021, 20:35:43 »
Из Debian 10 убрали rc.local
Но надо.
Кароч делаем так
touch /etc/systemd/system/rc-local.service
в нем
[Unit]
Description=/etc/rc.local
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
потом
touch /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
потом права на выполнение для rc.local
chmod +x /etc/rc.local
потом добавить сервис в автозапуск
systemctl enable rc-local
и стартануть сервис
systemctl start rc-local
ну и проверить
systemctl status rc-local
всЁ
Но надо.
Кароч делаем так
touch /etc/systemd/system/rc-local.service
в нем
[Unit]
Description=/etc/rc.local
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
потом
touch /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
потом права на выполнение для rc.local
chmod +x /etc/rc.local
потом добавить сервис в автозапуск
systemctl enable rc-local
и стартануть сервис
systemctl start rc-local
ну и проверить
systemctl status rc-local
всЁ