bash script - check and delete obsolete php-fpm configs

  • I have created a small bash-script which check and deletes obsolete php-fpm configs (from phpswitcher bug) via cron job.


    - backup of the config files to be deleted

    - delete obsolete php-fpm config files

    - restart of phpswitcher PHP services

    - E-Mail notification

    Use at your own risk - please test in a V-Box before use it!

    Suggestions for improvement are welcome.


    apt install mailutils

    nano /root/

    copy & paste the script below

    set your imscp database user & password, email and backup path

    chmod + x /root/

    run /root/ via cron job (period 5-15 minutes)

    ## edit ##

    added missing /root path to the awk line ;-)

    Edited 10 times, last by fulltilt ().