Skip to content
Snippets Groups Projects
Select Git revision
  • 5da2f05e775b5dde83b6ee539b788cb9ef5d4b0c
  • master default protected
  • simple-task/7248-eol-check-add-node-22
  • 6877_check_iml_deployment
4 results

check_fs_writable

Blame
  • dokuwiki.php 4.47 KiB
    <?php
    /* ______________________________________________________________________
     * 
     * A P P M O N I T O R  ::  CLIENT - CHECK
     * ______________________________________________________________________
     * 
     * Check for a Dokuwiki instance.
     * https://www.dokuwiki.org/
     * 
     * @author: Axel Hahn - https://www.axel-hahn.de/
     * ----------------------------------------------------------------------
     * 2024-12-23  v1.00  ah                   initial version
     * 2024-12-26  v1.01  ah                   fix directory checks
     * 2025-01-06  v1.02  ah                   add df
     */
    
    // ----------------------------------------------------------------------
    // Init
    // ----------------------------------------------------------------------
    
    $aAppDefaults = [
        "name" => "Dokuwiki",
        "tags" => ["dokuwiki", "wiki"],
        "df" => [
            "warning" => "100MB",
            "critical" => "10MB"
        ]
    ];
    
    require 'inc_appcheck_start.php';
    
    // ----------------------------------------------------------------------
    // Read Concrete5 specific config items
    // ----------------------------------------------------------------------
    
    $sConfigfile = "$sApproot/conf/local.php";
    if (!file_exists($sConfigfile)) {
        header('HTTP/1.0 400 Bad request');
        die('ERROR: Config file was not found. Use ?rel=[subdir] to set the correct subdir to find /conf/local.php.');
    }
    
    // ----------------------------------------------------------------------
    // checks
    // ----------------------------------------------------------------------
    
    // required php modules
    // see https://www.dokuwiki.org/install:php
    $oMonitor->addCheck(
        [
            "name" => "PHP modules",
            "description" => "Check needed PHP modules",
            // "group" => "folder",
            "check" => [
                "function" => "Phpmodules",
                "params" => [
                    "required" => [
                        "json",
                        "pcre",
                        "session",
                    ],
                    "optional" => [
                        "bz2",
                        "gd",
                        "intl",
                        "mbstring",
                        "openssl",
                        "zlib"
                    ],
                ],
            ],