AHH... sorry, #exec is a FOP2 feature. It is not present in FOP. You can write a shell script too to generate the op_buttons.cfg file, and after the file is generated you can send the HUP signal to op_server.pl so it rereads the config file.
#exec on fop2 does that, but internally.
Best regards,