/etc/profile.d
is a vendor-specific means of customizing the environment of a shell session (setting PATH
and so forth), and would not typically be related to the startup of a daemon; some would even argue that daemon startup should in no way involve /etc/profile.d
, so that user shell customizations cannot cause a daemon to fail to load, or to load with incorrect environment settings (timezone, locale, or so forth).
/etc/init.d
is part of the SystemV init system as implemented on Linux (Digital UNIX by contrast placed it under /sbin/init.d
); one could write a proper init script (study the existing scripts to see how to do this properly) that would launch your daemon. This would give you compatibility with both RHEL6 and RHEL7.
An @reboot
cron job could start your daemon, though systemd
under RHEL7 does offer better management features than a fire-and-forget from cron (what happens if the daemon crashes? should it be restarted automatically? how bad would it be if multiple instances were started? if bad, what sort of locking would be necessary to only start one instance?).