Answer the question
In order to leave comments, you need to log in
How to make rc.local work?
It is necessary to restart the supervisor at system startup, I decided to do it through rc.local
in /etc/rc.local and wrote
#!/bin/sh
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/etc/super
exit 0
In theory, if you execute sudo /etc/rc.local then it is executed, it turns out that rc.local itself does not start at system startup?
Answer the question
In order to leave comments, you need to log in
1. What does it mean to reboot at system boot? M.b. upload?
2. An easy way to check if rc.local is running
after booting
3. For a complete answer, you need to know your Linux distribution, for example, in Ubuntu, rc.local is launched via the /etc/init.d script, you just need to add it to which runlevel you need
Starting from /etc/rc.local will be at an unpredictable point in time, for example before the service you want to restart is even started. Therefore, it would be more correct to create your own systemd service, which will have the appropriate dependencies.
Debian 11 Bullseye :
create a new rc.local file manually in /etc/ with the lines:
#!/bin/sh -e
#
# rc.local
#
#Oo - tyt nuwu 4to xo4ewb
exit 0
chmod +x /etc/rc.local
systemctl daemon-reload
systemctl start rc-local
systemctl status rc-local
● rc-local.service - /etc/rc.local Compatibility
Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled)
Drop-In: /usr/lib/systemd/system/rc-local.service.d
└─debian.conf
Active: active (exited)
Docs: man:systemd-rc-local-generator(8)
Process: 58756 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question