1,760
edits
Changes
→Developer Specific
* [http://0pointer.de/blog/projects/on-etc-sysinit.html systemd: On /etc/sysconfig and /etc/default]
=System Administration=
== Add systemd service to replace rc.local ==
* Reference [https://bbs.archlinux.org/viewtopic.php?id=148170 systemd service for replacing rc.local]
Add the following to the file /usr/lib/systemd/system/rc-local.service:
<pre>
[Unit]
Description=/etc/rc.local Compatibility
After=network.target
[Service]
Type=oneshot
ExecStart=-/etc/rc.local
TimeoutSec=0
StandardInput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
</pre>
Call whatever script you want to run in /etc/rc.local and use systemctl to enable rc-local.service at boot time.
[[Category:OPS335]][[Category:OPS335 Labs]]