disable cpanel_php_fpm via salt-stack

Rustam.Aheiev

Registered
Oct 29, 2021
3
0
1
Ukraine
cPanel Access Level
Root Administrator
Hi all!
We have a lot of cPanel servers and we don't use cpanel_php_fpm
But someone enabled this service on different hosts and when we make localmove we often getting error with phpmyadmin... so if service cpanel_php_fpm is enable need to restart it after localmove account. I want to disable this service via salt. How can I do this? And how can I to check who enabled this service via WHM web interface?
I have 2 ideas ho to disable... but what way is better? Salt applying once in 24 hours.
1. cmd.run 'whmapi1 configureservice service='cpanel_php_fpm' enabled=0'
2. cpanel_php_fpm
service.running:
- enable: False
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,774
1,871
363
cPanel Access Level
Root Administrator
Hey there! The API call is definitely the safer way to make that change as executes the operation just as if you were clicking something in the WHM interface.

There isn't going to be a way to see who enabled the setting through WHM. The best option would be to check the /usr/local/cpanel/logs/access_log file on the machine and see if you can find an entry that matches up to when you're seeing the change.