summaryrefslogtreecommitdiff
path: root/services/applications/php56.cf
blob: 5f96d2502fc6649914028c9ef61b8589630c4e1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
bundle agent php56
{
    methods:
        freebsd::
            "freebsd"  usebundle => install_package("$(this.bundle)", "php56");
            "freebsd"  usebundle => add_rc_conf_line("$(this.bundle)", "php_fpm_enable=\"YES\"");
    files:
        freebsd::
            "/usr/local/etc/php.ini"
                link_from => ln_s("/usr/local/etc/php.ini-production"),
                move_obstructions => "true",
                classes => if_repaired("php56_php_ini_file_repaired");
            "/usr/local/etc/php-fpm.conf"
                create => "true",
                edit_defaults => empty,
                perms => system_owned("444"),
                edit_template => "$(sys.inputdir)/templates/php/freebsd-php56-php-fpm.conf",
                classes => if_repaired("php56_php_fpm_conf_file_repaired");
    classes:
        freebsd::
            "php_fpm_service_running" expression => returnszero("/usr/sbin/service php-fpm status", "noshell");
    commands:
        freebsd.!php_fpm_service_running::
            "/usr/sbin/service php-fpm start" classes => if_repaired("php_fpm_service_repaired");
        freebsd.(php56_php_fpm_conf_file_repaired|php56_php_ini_file_repaired)::
            "/usr/sbin/service php-fpm restart" classes => if_repaired("php_fpm_service_restarted");
    reports:
        any::
            "$(this.bundle): /usr/local/etc/php.ini repaired" ifvarclass => "php56_php_ini_file_repaired";
            "$(this.bundle): /usr/local/etc/php-fpm.conf repaired" ifvarclass => "php56_php_fpm_conf_file_repaired";
            "$(this.bundle): sshd service repaired" ifvarclass => "php_fpm_service_repaired";
            "$(this.bundle): sshd service restarted" ifvarclass => "php_fpm_service_restarted";
}