F5F Stay Refreshed Software Operating Systems Run a Debian script when the system boots up

Run a Debian script when the system boots up

Run a Debian script when the system boots up

M
mauro14400
Junior Member
41
11-12-2023, 03:44 PM
#1
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.
M
mauro14400
11-12-2023, 03:44 PM #1

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.

A
AzoTax
Member
209
11-12-2023, 03:56 PM
#2
Adjust the crontab entry to ensure proper execution rights. Verify the script has sufficient access. Monitor logs for any issues during startup. Suggest testing the command at a different time if needed.
A
AzoTax
11-12-2023, 03:56 PM #2

Adjust the crontab entry to ensure proper execution rights. Verify the script has sufficient access. Monitor logs for any issues during startup. Suggest testing the command at a different time if needed.

P
pinoybusta12
Member
139
11-12-2023, 04:47 PM
#3
It seems the script requires no sudo access, yet removing sudo doesn't resolve the issue.
P
pinoybusta12
11-12-2023, 04:47 PM #3

It seems the script requires no sudo access, yet removing sudo doesn't resolve the issue.

F
FlowInto
Junior Member
16
11-20-2023, 06:10 AM
#4
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.
F
FlowInto
11-20-2023, 06:10 AM #4

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.

3
3gilad3
Senior Member
735
11-20-2023, 12:13 PM
#5
Activate RGB settings now.
3
3gilad3
11-20-2023, 12:13 PM #5

Activate RGB settings now.

X
Xephtor
Member
192
11-20-2023, 04:09 PM
#6
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"
X
Xephtor
11-20-2023, 04:09 PM #6

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"