How to Add /etc/rc.local to Debian 9 Stretch ?
/etc/rc.local is depricated on debian 9.
You can try this to add it. (Not tested)
1) Create the file : /etc/systemd/system/rc-local.service
# nano /etc/systemd/system/rc-local.service
2) Copy this text.
[Unit]
Description=/etc/rc.local Compatibility
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
3) Create file : /etc/rc.local
# nano /etc/rc.local
5) Add this text to the file
#!/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
6) Make the script executable : /etc/rc.local
# chmod +x /etc/rc.local
7) Activate on boot
# systemctl enable rc-local
Comments