cat << EOF > /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=http://multi-user.target/
EOF
if ! [ -r /etc/rc.local ]; then
printf '%s\n' '#!/bin/bash' 'exit 0' | tee -a /etc/rc.local
fi
chmod +x /etc/rc.local
systemctl enable rc-local
You must log in or # to comment.