Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
How to make Linux execute a line of commands startup
How to make Linux execute a line of commands startup
I tried to find rc.local, but I didn't find it in / etc directory, nor init. D and RC. D. what should I do? I installed debian10 standard in PVE
Last edited by saeson on 2019-12-20 16:18, edited 1 time in total.
Re: How to make Linux execute a line of commands automatical
Just create /etc/rc.local file , and then:
Code: Select all
chmod +x /etc/rc.local
systemctl enable rc.service
systemctl status rc.service
Re: How to make Linux execute a line of commands automatical
L_V wrote:Just create /etc/rc.local file , and then:Code: Select all
chmod +x /etc/rc.local systemctl enable rc.service systemctl status rc.service
root@qbte1:~# systemctl enable rc.service
Failed to enable unit: Unit file /lib/systemd/system/rc.service is masked.
root@qbte1:~# systemctl status rc.service
● rc.service
Loaded: masked (Reason: Unit rc.service is masked.)
Active: inactive (dead)
Is there something missing ?
Re: How to make Linux execute a line of commands automatical
Code: Select all
systemctl unmask rc.service
Re: How to make Linux execute a line of commands automatical
root@qbte1:~# systemctl unmask rc.serviceL_V wrote:Code: Select all
systemctl unmask rc.service
root@qbte1:~# systemctl status rc.service
● rc.service
Loaded: masked (Reason: Unit rc.service is masked.)
Active: inactive (dead)
It doesn't seem to work
Re: How to make Linux execute a line of commands automatical
This one ?
Code: Select all
systemctl unmask rcS.service
Re: How to make Linux execute a line of commands automatical
root@qbte1:~# systemctl status rcS.serviceL_V wrote:This one ?Code: Select all
systemctl unmask rcS.service
● rcS.service
Loaded: masked (Reason: Unit rcS.service is masked.)
Active: inactive (dead)
root@qbte1:~#
same problem
Re: How to make Linux execute a line of commands automatical
I've used rc.local some time ago.
I don't know why now unmasking would not work, and did not remember any specific difficulty.
No more idea...
I don't know why now unmasking would not work, and did not remember any specific difficulty.
No more idea...
Re: How to make Linux execute a line of commands automatical
Thank you. I'll try again,L_V wrote:I've used rc.local some time ago.
I don't know why now unmasking would not work, and did not remember any specific difficulty.
No more idea...
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: How to make Linux execute a line of commands startup
Debian buster should now auto-run rc-local.service if /etc/rc.local exists and is executable: https://manpages.debian.org/buster/syst ... .8.en.html
@OP: please post the output of
Masked services will be symlinked to /dev/null, you could try deleting the symlink manually if there are any for rc-local.service.
EDIT: my buster box has rc.service (and rcS.service) masked by default:
@OP: please post the output of
Code: Select all
ls -lR /etc/systemd/system
EDIT: my buster box has rc.service (and rcS.service) masked by default:
Code: Select all
-rw-r--r-- 1 root root 716 Oct 16 14:24 rc-local.service
lrwxrwxrwx 1 root root 16 Oct 16 14:24 rc.local.service -> rc-local.service
drwxr-xr-x 1 root root 22 Nov 16 10:39 rc-local.service.d
lrwxrwxrwx 1 root root 9 Oct 16 14:24 rc.service -> /dev/null
lrwxrwxrwx 1 root root 9 Oct 16 14:24 rcS.service -> /dev/null
deadbang