Rc.local is in the old Debian system, and after version 6, this is gone, and here's how Debian 9 sets up the boot script:
New file:
Vi/etc/systemd/system/rc-local.service
Edit content:
[Unit] Description=/etc/rc.localconditionpathexists=/etc/rc.local[service]type=forkingexecstart=/etc/rc.local Starttimeoutsec=0standardoutput=ttyremainafterexit=yessysvstartpriority=99[install]wantedby=multi-user.target
New file:
Vi/etc/rc.local
Content:
#!/bin/sh-e## rc.local## This script was executed at the end of each multiuser runlevel.# make sure that the script would " Exit 0 "On success or any other# value on error.## in order to enable or disable this script just change the execution# bi ts.## By default this script does Nothing.exit 0
Add Permissions:
chmod +x/etc/rc.local
Set to System boot:
Systemctl Enable Rc-local
Startup script:
Systemctl Start Rc-local.service
Check Service Status:
Systemctl Status Rc-local.service
Above you have successfully created a system startup script, and the original address is as follows:
Original address: http://www.itechlounge.net/2017/10/linux-how-to-add-rc-local-in-debian-9/
Next you can add any script you want to start in front of the exit in/etc/rc.loacl, such as:
Cd/home/wjf/flypigsh run.sh
Linux:how to add rc.local in Debian 9