Questions tagged [rc.local]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
20 views

How to run rc.local also before shutdown?

I saw many similar questions, but none to include option of start on boot and stop on shutdown. With the old SystemV system you could simply link rc.local to rc3.d/K20rc.local, and it would get ...
3
votes
2answers
45 views

Python script executed in rc.local does not log, unless with a non-zero code

My rc.local service executes a python script on startup: it works fine but it doesn't log anywhere, unless an error occurres and exits with a non-zero code. This script runs scheduled operations, ...
0
votes
1answer
20 views

An application keeps being called each time I log in to user

I've been using Armbian Buster v5.10 and configuring it for a project. I remember making some changes so that startx runs automatically at startup. Each time I log in via su myUser then startx gets ...
0
votes
0answers
15 views

Make server run job on reboot of instance, from instance startup/init script

I want to run a python script as a user on reboot of a server. The server itself it spun up on azure via terraform. I've already got a startup script called startup.sh. It does various things to the ...
0
votes
0answers
34 views

Risks of adding scripts to rc.local

I need authoritative explanation of risks of adding commands (scripts, programs) to rc.local.** So far I know, that if I add some command or script that will get stuck for some reason (loop, ...
0
votes
0answers
39 views

rc.local not able to execute python script with network code

To introduce my problem, I'm running Raspbian Stretch on a RPi 3 model B+, and I have two scripts that I run in /etc/rc.local so that the pi can run completely headless and control a GoPro over wifi ...
0
votes
1answer
62 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... ...
1
vote
2answers
351 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 ...
2
votes
1answer
103 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 ...
0
votes
0answers
291 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
29 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
26 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-...
1
vote
1answer
150 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 ...
0
votes
1answer
192 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
1answer
434 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
2answers
544 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
2answers
163 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....
1
vote
2answers
2k 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 ...
2
votes
2answers
928 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 ...
0
votes
0answers
953 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 ...
42
votes
3answers
45k 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?)......