Skip to content

Instantly share code, notes, and snippets.

@mqu
Last active November 13, 2020 06:30
Show Gist options
  • Save mqu/38c07bc77360988b5a718d840b56b20f to your computer and use it in GitHub Desktop.
Save mqu/38c07bc77360988b5a718d840b56b20f to your computer and use it in GitHub Desktop.
enable /etc/rc.local with systemd
cat > /etc/systemd/system/rc-local.service <<'EOF'
[Unit]
After=network.service
[Service]
ExecStart=/etc/rc.local start
[Install]
# WantedBy=default.target
WantedBy=multi-user.target
EOF
chmod 664 /etc/systemd/system/rc-local.service
systemctl daemon-reload
systemctl enable rc-local.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment