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

add contents like below and save

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.

[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

 

systemctl enable rc-local.service  //This command to enable rc.local excute on boot

systemctl start rc-local.service   //This command to start rc.local excuting manual

systemctl status rc-local.service   //This command to see status of excuting and debug information

arrow
arrow

    痞客興 發表在 痞客邦 留言(0) 人氣()