rc.local v stretch
V Debian9 - STRETCH je ukončená podpora služby rc.local
Službu je možné obnoviť nasledovne:
Vytvorenie súboru "rc-local.service"
sudo gedit /etc/systemd/system/rc-local.service
s obsahom:
[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
Vytvorenie súboru "rc.local"
sudo gedit /etc/rc.local
s obsahom:
#!/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.
príkaz1
príkaz2
exit 0
následne príkazy:
chmod +x /etc/rc.local -- zmena vlastností
systemctl enable rc-local -- povolí skript pri boote
systemctl start rc-local.service -- odskúšanie skriptu
systemctl status rc-local.service -- zistenie statusu
Kontakt :
0905 345640
ivan.saliga@uhliky.sk.