Probably easier to call a shell script with some parameters instead of directly influxdb binary.