@lniwn
2017-09-21T06:48:39.000000Z
字数 627
阅读 916
Linux
vim /etc/systemd/system/rc-local.service
[Unit]Description=/etc/rc.local serviceAfter=network.targetConditionPathExists=/etc/rc.local[Service]Type=forkingExecStart=/etc/rc.local startTimeoutSec=0RemainAfterExit=yes[Install]WantedBy=multi-user.target
#!/bin/sh -e## rc.local## This script is executed at the end of each multiuser runlevel.# Make sure that the script will "exit 0" on success or any other# value on error.## In order to enable or disable this script just change the execution# bits.## By default this script does nothing.exit 0
chown root:root /etc/rc.localchmod +x /etc/rc.local
