blob: 9607c544f8a1be2aad3b250e5d6042889c92486e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<?php
class Dnbd3 {
const PROP_ENABLED = 'dnbd3.enabled';
const PROP_NFS_FALLBACK = 'dnbd3.nfs-fallback';
public static function isEnabled()
{
return Property::get(self::PROP_ENABLED, 0) ? true : false;
}
public static function setEnabled($bool)
{
Property::set(self::PROP_ENABLED, $bool ? 1 : 0);
$task = Taskmanager::submit('Systemctl', array(
'operation' => ($bool ? 'start' : 'stop'),
'service' => 'dnbd3-server'
));
return $task;
}
public static function hasNfsFallback()
{
return Property::get(self::PROP_NFS_FALLBACK, 0) ? true : false;
}
public static function setNfsFallback($bool)
{
Property::set(self::PROP_NFS_FALLBACK, $bool ? 1 : 0);
}
public static function getLocalStatus()
{
}
}
|