Ejecute el opcache artesanal del script php: optimice después del inicio o reinicio de php7.2-fpm

Ejecute el opcache artesanal del script php: optimice después del inicio o reinicio de php7.2-fpm

quiero correr

php /path/to/artisan opcache:optimize

para crear laravelcaché después php7.2-fpmdel inicio o después del reinicio. Intenté insertarlo /etc/init.d/php7.2-fpmen el do_start()método pero fallé, el código no se ejecutó.

por favor alguna idea? gracias

Respuesta1

resuelto editando/lib/systemd/system/php7.2-fpm.service

agrego ExecStartPost=/usr/bin/php /path/to/artisan opcache:optimize y luego recargo el demonio

systemctl daemon-reload

información relacionada