Run a Debian script when the system boots up
Run a Debian script when the system boots up
You need to grant sudo access to the script so it runs automatically at startup. Make sure the .sh file is executable and that sudo permissions are correctly set.
It seems the script requires no sudo access, yet removing sudo doesn't resolve the issue.
Ensure the directory contains necessary commands and functions. Place your script in /etc/local.d/myscript.start and make it executable. Verify the presence of a /etc/systemd/ configuration if using systemd. The setup should cover start, stop, restart, and status operations. Your init system may vary, but these steps should work well.
I run the command to activate the background service for RGB. I have a Debian VM and will make it function properly for you. EDIT: I got bored. Copy-paste the following into a terminal as root:
echo "#/etc/systemd/system/rgb.service [Service] Type=oneshot RemainAfterExit=yes ExecStart=/root/bin/make_rgb_work.sh [Install] WantedBy=multi-user.target" >/etc/systemd/system/rgb.service;mkdir -p /root/bin;echo '#!/bin/bash #insert your commands to start RGB below this line' >/root/bin/make_rgb_work.sh;chmod +x /root/bin/make_rgb_work.sh;nano /root/bin/make_rgb_work.sh;systemctl enable rgb.service;systemctl restart rgb.service"