Open php-fpm
vim /etc/init.d/php-fpm
In the file, find the start function, add your commands at the end.
start () { ... # Your commands here}
Save and restart php-fpm
I have one article for you please once read it, It might be helpful to you Link
Open php-frm through CMD
Ubantu sudo gedit /etc/init.d/php-fpm
sudo gedit /etc/init.d/php-fpm
You put the code under following function.
function start { /* Your code here */}