I added
if [ "$1" = "start" ] || [ "$1" = "stop" ] || [ $
then
node --max-old-space-size=1024 pimatic.js $1
exit "$?"
But get this error now
$ sudo service pimatic start
Job for pimatic.service failed. See 'systemctl status pimatic.service' and 'journalctl -xn' for details.