You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
443 B
23 lines
443 B
3 years ago
|
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
|
||
|
}
|