コード例 #1
0
ファイル: install_ghost.php プロジェクト: Git-Host/AMPPS
    echo 'Installed';
    // Start the Node service
    __do_exec('export HOME=[[nodedir]]; cd [[softpath]]; [[nodedir]]/bin/npm start --production > [[ghostlog]] 2>&1 &', 'Error starting ghost !');
    // Were there any errors
    if (!empty($error)) {
        return false;
    }
    echo 'Started';
    // Installed successfully
    file_put_contents('soft_ghost_install_success', 1);
}
// Execute exec(); Set $debug to 1 to print output
function __do_exec($cmd, $errorStr, $debug = 0)
{
    global $error;
    exec($cmd, $out, $ret);
    echo $cmd . '<br>';
    print_r(array($ret, $out));
    if (!empty($ret)) {
        $error[] = $errorStr;
    }
    // Store the error
    if (!empty($error)) {
        file_put_contents('soft_ghost_install_error', serialize($error));
    }
}
// Delete your self
@unlink(__FILE__);
// Start the install
__install();
コード例 #2
0
ファイル: install.php プロジェクト: joostina/joostina
            <td><input name="admin_password" value=""/></td>
        </tr>
        <tr class="passed">
            <th>Email адрес администратора</th>
            <td><input name="admin_email" value=""/></td>
        </tr>
        <tr class="warning">
            <th>Всё верно</th>
            <td>
                <button>Создать администратора</button>
            </td>
        </tr>
    </table>
<!--
    <h2><?php 
echo __install('Восстановить данные');
?>
</h2>
    <table>
        <tr class="passed">
            <th>Сайт про машинки # 19:05:2011</th>
            <td>
                <button>Восстановить</button>
            </td>
        </tr>
        <tr class="passed">
            <th>Сайт про машинки # 25:05:2011</th>
            <td>
                <button>Восстановить</button>
            </td>
        </tr>