Questions tagged [rc.local]
The rc.local tag has no usage guidance.
20
questions
0
votes
1
answer
40
views
Run script in rc.local not as root
I want to launch python script on boot, but rc.local launches it as root, which causes error in my python module. Is it possible to make it run as non root? Instead of nohup python /home/pi/script.py &...
0
votes
0
answers
24
views
python wont import can module in rc.local
I want to automate my python script which controls devices through CAN. I can start script simply from terminal, but I dont want to do that every time. So I put nohup python /home/pi/script.py & ...
3
votes
2
answers
74
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
1
answer
25
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
0
answers
17
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
1
answer
106
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
2
answers
617
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
1
answer
183
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
0
answers
420
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
0
answers
42
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
0
answers
37
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
1
answer
218
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
1
answer
335
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
1
answer
1k
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
2
answers
842
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
1
answer
188
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
2
answers
3k
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
2
answers
1k
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
0
answers
2k
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 ...
47
votes
3
answers
55k
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?)......