Questions tagged [rc.local]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
32
votes
3answers
28k views

What is the correct substitute for rc.local in systemd instead of re-creating rc.local

I cannot find the correct way to execute some local scripts (or very local commands) at systemd, I already know I must not create a service (in systemd a unit) for this kinds of scripts (or I must?)......
2
votes
2answers
637 views

Run a command as root on startup

I need to run this command line at startup: echo 1 > /sys/module/bluetooth/parameters/disable_ertm When I go to terminal type SU enter my password type that command it works perfectly, yet when ...
2
votes
1answer
44 views

Block internet for a specific user, permanently [duplicate]

This works: sudo iptables -A OUTPUT -m owner --uid-owner {USERNAME} -j REJECT to block internet for a specific user. But it's not permanent. What's the easiest way to make this persistent after a ...
1
vote
2answers
41 views

LXC container will start at the command line, but not automatically, from cron's @reboot or from /etc/rc.init

I can always start my container successfully with: fadedbee@host:~$ sudo lxc-start -n mycontainer It used to start automatically, until I bound some directories on a local ZFS to it. I added the ...
1
vote
1answer
66 views

rc.local - script message suppression

I am working on a Raspberry Pi project; it includes NUT server configuration and making the OS Image read-only. I have completed the required steps and configured the NUT server. I uninstalled the ...
1
vote
1answer
997 views

If rc.local is run as root why can't it touch a file

I wish to execute a script every time on boot-up using /etc/rc.local. My script for example is called startscript.sh which is stored in /home/debian as below. It first tries to create a file called ...
0
votes
2answers
228 views

HOME not set when running bash from rc.local

I have a line in rc.local to run a simple bash script upon boot. The operating system is Raspbian Stretch 4.14 on a Raspberry Pi 3B+, with a 'Witty Pi 2' power management board (UUGear). bash /home/...
0
votes
1answer
20 views

fluxbox inside rc.local startup script sometimes does not spawn process and start

This issue is driving me crazy. I have no clue why it sometimes happens. Its totally feeling intermittent. I have a /etc/rc.local shell script that fires off on startup. I am using Ubuntu x64 19.10... ...
0
votes
1answer
81 views

Start a tmux detached on boot up under a user

I'm on ubuntu 19 and I created the file /etc/rc.local and added this to the file: /bin/su -l mysuser -c "/usr/bin/tmux new-session -s foobar -d" I tried running this line by pasting it to the ...
0
votes
0answers
36 views

Help with rc.local and executing a script on startup in debian 10

I'm new to debian and I'm currently really struggling to make a script execute at startup. I've tried cron and update-rc.d but neither worked for me. So I'm now trying to work with rc.local. In there ...
0
votes
0answers
50 views

How to redirect the output of script in rc.local onto screen?

I have a script in rc.local. /root/initstart.sh | tee -a /root/initstart.log I need this script to be executed when system startup. This script needs a very long time to finish. I want to know if it'...
0
votes
0answers
22 views

Errors on startup

I have installed 3 days ago Debian 10.3.0 with LXQT. It's great and I like it, it boot fine, each kernel line on boot is so great to see when appears 2 red lines that are so ugly! [OK] Started /etc/...
0
votes
0answers
31 views

rc.local doesn't run my app

Hi everyone I'm working with Yocto Linux and I want to run a program while yocto is starting, I finish to configure rc.local, but my program doesn't run and when I run my program with sudo ./app i get ...
0
votes
0answers
22 views

Linux: print disappears for an executable in rc.local

I have an executable program /home/user/foo with root and executable permissions. The foo has 3 threads and performs outputs using printf. This program is placed in embedded target with Linux, 4.1.22-...
0
votes
0answers
51 views

Can't pipe stdout of a python script that runs in background to file

I have a python script myscript.py on a RaspberryPi with Raspbian that starts on boot via rc.local file. Since it has infinite loop in it I need to run it in background. So far so good but I also want ...
0
votes
0answers
298 views

How to check the history of processes

I'm using Debian running on a BeagleBone Black. I have a script which is supposed to execute when the system starts. The script then should run a python script. I add the command to run this script ...
0
votes
2answers
125 views

Debian Stretch drop in boot-time script not using rc.local

I'm setting up a new installation of Debian Stretch. Because it's on custom NAS box, there's one small gripe I have - original software was booted from a USB memory module molded on to the motherboard....