As I said about CentOS 7 and about Debian 8 and about Ubuntu 15:
You're using a systemd+Linux operating system.
/etc/rc.local is a double backwards compatibility mechanism in systemd, because it is a backwards compatibility mechanism for a mechanism that was itself a compatibility mechanism in the van Smoorenburg System 5
/etc/rc.local can go horribly wrong. People have been surprised by the fact that systemd doesn't run
rc.local in quite the same way, in quite the same place in the bootstrap, as they are used to. (Or erroneously expect: It did not, in fact, run last in the old system, as the OpenBSD manual still points out.) Others have been surprised by the fact that what they set up in
rc.local expecting the old ways of doing things, is then completely undone by the likes of new
udev rules, NetworkManager,
systemd-resolved, or various "Kit"s.
As exemplified by "Why does `init 0` result in "Excess Arguments" on Arch install?", some operating systems already provide systemd without the backwards compatibility features such as the
systemd-rc-local-generator generator. Whilst Debian still retains the backwards compatibility features, Arch Linux builds systemd with them turned off. So on Arch and operating systems like it expect
/etc/rc.local to be entirely ignored.
rc.local. It's not the way to go. You have a systemd+Linux operating system. So make a proper systemd service unit, and don't begin from a point that is two levels of backwards compatibility away. (On Ubuntu and Fedora, it is three times removed, the van Smoorenburg System 5
rc clone that followed
rc.local having then been itself twice superseded, over a decade ago, first by upstart and then by systemd.)
Also remember the first rule for migrating to systemd.
This is not even a new idea that is specific to systemd. On van Smoorenburg
rc and Upstart systems, the thing to do was to make a proper van Smoorenburg
rc script or Upstart job file rather than use
rc.local. Even FreeBSD's manual notes that nowadays one creates a proper Mewburn
rc script instead of using
rc was introduced by NetBSD 1.5 in 2000.
/etc/rc.local dates from the time of Seventh Edition Unix and before. It was superseded by
/etc/inittab and a runlevel-based
rc in AT&T Unix System 3 (with a slightly different
/etc/inittab in AT&T Unix System 5) in 1983. Even that is now history.
Create proper native service definitions for your service management system, whether that be a service bundle for the nosh toolset's
/etc/rc.d/ script for Mewburn
rc, a service unit file for systemd, a job file for Upstart, a service directory for runit/s6/daemontools-encore, or even an
/etc/init.d/ script for van Smoorenburg
In systemd, such administrator-added service unit files go in
/etc/systemd/system/ usually (or
/usr/local/lib/systemd/system/ rarely). With the nosh service manager,
/var/local/sv/ is a conventional place for local service bundles. Mewburn
rc on FreeBSD uses
/usr/local/etc/rc.d/. Packaged service unit files and service bundles, if you are making them, go in different places, though.