start script at boot for kali linux

You can add this script to /etc/crontab:

@reboot /path/to/your/start.sh

From man 5 crontab:

@reboot    :    Run once after reboot.

Had the same problem, found a solution in this post elsewhere.

Summary:

sudo vim /etc/systemd/system/rc-local.service

Then add the following content to it.

[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

Note: Starting with 16.10, Ubuntu doesn’t ship with /etc/rc.local file anymore. Same thing for other distributions like Kali. You can create the file by executing this command.

printf '%s\n' '#!/bin/bash' 'exit 0' | sudo tee -a /etc/rc.local

Then add execute permission to /etc/rc.local file.

sudo chmod +x /etc/rc.local

After that, enable the service on system boot:

sudo systemctl enable rc-local

Finally, start the service and check its status:

sudo systemctl start rc-local.service
sudo systemctl status rc-local.service

The complete post in https://www.linuxbabe.com/linux-server/how-to-enable-etcrc-local-with-systemd