import { execSync } from 'child_process' // Returns one of: off, installed, enabled, running, synced, error export function lightningStatus() { try { const stdout = execSync('lightning-cli -V') } catch(err) { return 'off' } try { const stdout = execSync('lightning-cli getinfo') } catch(err) { return 'installed' } return 'running' } export default { description: 'payments', status: lightningStatus }