
rleutz
(usa Arch Linux)
Enviado em 19/03/2018 - 10:15h
tenta isso
sudo vi /etc/systemd/system/rc-local.service
Then add the following content to it.
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
After=network-online.target
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
Save and close the file. Make sure /etc/rc.local file is executable.
sudo chmod +x /etc/rc.local
After that, enable the service on system boot:
sudo systemctl enable rc-local
Output:
Created symlink from /etc/systemd/system/multi-user.target.wants/rc-local.service to /etc/systemd/system/rc-local.service.
Now start the service and check its status:
sudo systemctl start rc-local.service
sudo systemctl status rc-local.service
Output:
● rc-local.service - /etc/rc.local Compatibility
Loaded: loaded (/etc/systemd/system/rc-local.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2015-11-27 00:32:56 CST; 14min ago
Process: 879 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
Main PID: 880 (watch)
CGroup: /system.slice/rc-local.service
dai coloca as linhs no /etc/rc.local