|
|
@ -4,6 +4,7 @@ import json
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
import subprocess
|
|
|
|
import sys
|
|
|
|
import sys
|
|
|
|
|
|
|
|
import time
|
|
|
|
from enum import Enum
|
|
|
|
from enum import Enum
|
|
|
|
|
|
|
|
|
|
|
|
path = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
path = os.path.dirname(os.path.abspath(__file__))
|
|
|
@ -38,6 +39,7 @@ if __name__ == '__main__':
|
|
|
|
parser.add_argument('STATE', type=State, choices=list(State))
|
|
|
|
parser.add_argument('STATE', type=State, choices=list(State))
|
|
|
|
parser.add_argument('PRIORITY', type=int)
|
|
|
|
parser.add_argument('PRIORITY', type=int)
|
|
|
|
args = parser.parse_args()
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
time.sleep(2)
|
|
|
|
|
|
|
|
|
|
|
|
with open(os.path.join(path, "keepalived.json")) as config_file:
|
|
|
|
with open(os.path.join(path, "keepalived.json")) as config_file:
|
|
|
|
config = json.load(config_file)
|
|
|
|
config = json.load(config_file)
|
|
|
|