intelmqctl restart <tab> accesses the runtime.conf and
intelmqctl clear <tab> accesses the pipeline.conf
the script could access intelmqctl directly for getting this information. or the API (if it caches the information, could be faster - if installed)
See also #1240