remove not needed anymore check_status () function

This commit is contained in:
Nikolay Brovko 2020-01-26 22:13:22 +03:00
parent f22f3f9504
commit 881542f9d3
No known key found for this signature in database
GPG Key ID: 32258A3DEC9B6F07

View File

@ -46,8 +46,6 @@ namespace Yggtk {
Object(application: application);
check_status (service_state_switch);
ip_entry.notify["text"].connect (() => {
if (ip_entry.text != "") {
@ -82,53 +80,6 @@ namespace Yggtk {
}
int check_status (Switch status) {
try {
string yggstatus;
Process.spawn_command_line_sync ("rc-service yggdrasil status", out yggstatus);
if (yggstatus == "bash: rc-service: command not found\n") {
Process.spawn_command_line_sync ("systemctl status yggdrasil | grep running -c", out yggstatus);
if (yggstatus == "0") {
status.state_set (false);
} else {
status.state_set (true);
}
} else {
if (yggstatus == " * status: stopped\n") {
status.state_set (false);
} else {
status.state_set (true);
}
}
} catch (Error e) {
print ("Error check status: %s\n", e.message);
return 1;
}
return 0;
}
int parse (string yggconf, Entry ip) {
try {