Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hostcheck@schorschii: fix ping for LM 20 #552

Merged
merged 1 commit into from Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions hostcheck@schorschii/files/hostcheck@schorschii/desklet.js 100755 → 100644
Expand Up @@ -86,21 +86,22 @@ MyDesklet.prototype = {
flags: Gio.SubprocessFlags.STDOUT_PIPE,
});
if(this.type == 'ping') {
subprocess = new Gio.Subprocess({
argv: ['/bin/ping',this.host,'-c1','-w2'],
let subprocessl = new Gio.SubprocessLauncher({
flags: Gio.SubprocessFlags.STDOUT_PIPE,
});
subprocessl.setenv("LANG", "en", true);
subprocess = subprocessl.spawnv(['/bin/ping',this.host,'-c1','-w2']);
}
else if(this.type == 'http') {
subprocess = new Gio.Subprocess({
argv: ['/usr/bin/curl','-s','-o','/dev/null','-w','"%{http_code}"','-m','5',this.host],
flags: Gio.SubprocessFlags.STDOUT_PIPE,
});
subprocess.init(null);
}
else {
return;
}
subprocess.init(null);
subprocess.desklet = this;
subprocess.wait_async(null, this.commandCallback);
},
Expand Down
2 changes: 1 addition & 1 deletion hostcheck@schorschii/files/hostcheck@schorschii/metadata.json 100755 → 100644
Expand Up @@ -2,6 +2,6 @@
"max-instances": "10",
"description": "Checks a host via ping or HTTP(S) and displays if it is available.",
"name": "Host Check",
"version": "1.0",
"version": "1.1",
"uuid": "hostcheck@schorschii"
}
Empty file.
Empty file modified hostcheck@schorschii/files/hostcheck@schorschii/stylesheet.css 100755 → 100644
Empty file.