I see that you created an init script, but then you called systemctl. Any reason not to use systemd units?
#! /bin/sh
...
source /lib/lsb/init-functions
and have it not work on systems where /bin/sh is (say) the Debian Almquist shell. (-: