Made it work to replace my bash script.