changed to bash script, doesn't run in sh on debianx