Skip to content

Instantly share code, notes, and snippets.

@gsdefender
Created February 10, 2021 00:11
Show Gist options
  • Save gsdefender/599c0fdc3a20687e44e71611e6b58ce4 to your computer and use it in GitHub Desktop.
Save gsdefender/599c0fdc3a20687e44e71611e6b58ce4 to your computer and use it in GitHub Desktop.
rc.local for systemd-based distro
# Put this file in /etc/systemd/system
[Unit]
Description=A better rc.local-service
[Service]
Type=idle
ExecStart=/etc/rc.local.better
[Install]
WantedBy=network.target
After=multi-user.target
#!/bin/sh -e
#
# /etc/rc.local.better
#
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment