I would say don't look at the current distro to determine which init system to use to manage daemons:
- It's a little nebulous to determine a distro (as described in Dennis's answer)
- the init system in use changes between versions of a distro (as Michael Hampton noted, the big name distros are all gravitating toward systemd; Ubuntu is currently the one big-name holdout, and they plan to switch over by 2016).
- The init system may be changed on an individual installation from the default (starting with 14.10 Utopic Unicorn this October, some Ubuntu installations may elect to switch over to systemd ahead of time).
Although this isn't foolproof (a system may elect to install multiple init systems alongside each other), the way I would do it is to look for the presence of the tools themselves:
if command -v systemctl >/dev/null; then
# assume systemd
systemctl $command $servicename
elif command -v initctl >/dev/null; then
# assume upstart
initctl $command $servicename
elif command -v service >/dev/null; then
# assume old Debian `service` utility
service $servicename $command
# ... elif cases for any other utils you'd want to check for ...
else
# assume bare init.d scripts
/etc/init.d/$servicename $command
fi
This answer to a similar question describes some further heuristics you can use to determine the init system currently in use, for cases where this isn't accurate enough.
Ultimately, though, there's no one way to truly detect which one init system an installation "uses" - it's possible to create a setup that switches between init systems every time it boots.