try to make some of the functions non-systemd specific