Directadmin of the version 1.55.0 does not restart PHP-FPM after an user restoration if found domains with SSL certs.
The bug was already reported to Directadmin developers, and while we are waiting for an official fix, here is a possible solution from Poralix:
Create it if it does not exist:
cd /usr/local/directadmin/scripts/custom touch ./user_restore_post.sh chmod 700 ./user_restore_post.sh chown diradmin:diradmin ./user_restore_post.sh
Open it in an editor and populate the file with the following code lines:
#!/bin/bash # PHP-FPM is not restarted after an user import # so here we restart it restart_fpm() { echo "[$(date)] Restarting php-fpm${PHP_VER}"; /bin/systemctl restart "php-fpm${PHP_VER}"; ps aux | grep -v grep | grep "php-fpm: master process" | grep "${PHP_VER}"; } for PHP_VER in $(grep ^php[1-4]_release= /usr/local/directadmin/custombuild/options.conf | grep -v =no | cut -d= -f2 | awk -F. '{print $1$2}') do { restart_fpm | logger -t user_restore_post; } done;
Save the file and exit the editor.
You can control how it runs through /var/log/messages on a CentOS based server:
grep user_restore_post /var/log/messages
It's supposed that you see something like:
Feb 13 07:22:31 srvlin02 user_restore_post: [Wed Feb 13 07:22:31 CET 2019] Restarting php-fpm72 Feb 13 07:22:31 srvlin02 user_restore_post: root 16866 5.0 0.4 477088 16924 ? Ss 07:22 0:00 php-fpm: master process (/usr/local/php72/etc/php-fpm.conf) Feb 13 07:22:31 srvlin02 user_restore_post: [Wed Feb 13 07:22:31 CET 2019] Restarting php-fpm71 Feb 13 07:22:32 srvlin02 user_restore_post: root 16878 0.0 0.8 471088 32416 ? Ss 07:22 0:00 php-fpm: master process (/usr/local/php71/etc/php-fpm.conf)
That's it.
More links: