Difference between revisions of "/etc/rc.local"

From wikieduonline
Jump to navigation Jump to search
(Created page with "<code>/etc/rc.local</code> == See also == * {{etc}}")
 
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
  
 +
 +
touch <code>[[/etc/systemd/system/]]rc-local.service</code>
 +
 +
<pre>
 +
# /etc/systemd/system/rc-local.service
 +
[Unit]
 +
Description=/etc/rc.local Compatibility
 +
ConditionPathExists=/etc/rc.local
 +
 +
[Service]
 +
Type=forking
 +
ExecStart=/etc/rc.local start
 +
TimeoutSec=0
 +
StandardOutput=tty
 +
RemainAfterExit=yes
 +
SysVStartPriority=99
 +
 +
[Install]
 +
WantedBy=multi-user.target
 +
</pre>
 +
 +
sudo touch /etc/rc.local
 +
sudo chmod +x /etc/rc.local
 +
sudo [[systemctl enable]] rc-local
  
 
== See also ==
 
== See also ==
 
* {{etc}}
 
* {{etc}}
 +
 +
 +
[[Category:Linux]]

Latest revision as of 09:13, 16 December 2020

/etc/rc.local


touch /etc/systemd/system/rc-local.service

# /etc/systemd/system/rc-local.service
[Unit]
 Description=/etc/rc.local Compatibility
 ConditionPathExists=/etc/rc.local

[Service]
 Type=forking
 ExecStart=/etc/rc.local start
 TimeoutSec=0
 StandardOutput=tty
 RemainAfterExit=yes
 SysVStartPriority=99

[Install]
 WantedBy=multi-user.target
sudo touch /etc/rc.local
sudo chmod +x /etc/rc.local
sudo systemctl enable rc-local

See also[edit]

Advertising: