Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

MySQL install was not found or is stopped

// In /usr/lib/node_modules/ghost-cli/lib/commands/doctor/checks/mysql.js 
// immediately after the "async function mysqlIsRunning()" code block:
async function mariadbIsRunning() {
    try {
        const services = await sysinfo.services('mariadb');
        return services.some(s => s.name === 'mariadb' && s.running);
    } catch (error) {
        return false;
    }
}
// this goes directly into the "async function mysqlCheck(ctx, task)" block. after the "if (await mysqlIsRunning())" block
if (await mariadbIsRunning()) {
    // MariaDB service found that is also running, so return (instead of mysql)
    return;
}
Source by github.com #
 
PREVIOUS NEXT
Tagged: #MySQL #install #stopped
ADD COMMENT
Topic
Name
1+2 =