I build an RPM using fpm for EL6 hosts. It installs a /etc/init.d script. However if that package is installed on an EL7 host, I want it to install a file in /usr/lib/systemd/system instead.
Is there an easy way to tell FPM to make an RPM that will install different files on different operating systems?
If not, is it safe to install both and assume that EL6 hosts will ignore the systemd file, and EL7 hosts will ignore the /etc/init.d script?