Debian has removed rc.local from its recent releases.
I have created a simple script which adds rc.local back to the system.
You need to run the following command as root:
1 | bash <(curl -s https: //www .adminsehow.com /wp-content/uploads/2019/10/rc-local .txt) |
or if you are skeptical to run a script from internet, you can create rc-local.txt yourself and run it.
rc-local.txt :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #!/bin/bash echo '[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' > /etc/systemd/system/rc-local .service echo ' #!/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' > /etc/rc . local chmod +x /etc/rc . local systemctl enable rc- local |