Commit ce9852d7 authored by Antonin Delpeuch's avatar Antonin Delpeuch
Browse files

Changed the way we SSH to the server

parent ff29a522
......@@ -46,10 +46,8 @@ var ToolbarEvents = {
return;
var subject = msg.mime2DecodedSubject;
ToolbarEvents.mylog(msg);
var re = /moderate ([0-9A-F]{8}) \(([a-z0-9]*)\)/g;
matches = re.exec(subject);
ToolbarEvents.mylog(msg);
if(!matches)
{
......@@ -70,14 +68,11 @@ var ToolbarEvents = {
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);
var file = new FileUtils.File("/usr/bin/ssh");
var file = new FileUtils.File("/home/antonin/Programmation/Moderation/send-moderate.sh");
process.init(file);
ToolbarEvents.mylog("delpeuch@clipper \~gourous/bin/su-gourous \~gourous/bin/moderate --"+action+" "+cookie+" delpeuch");
process.runAsync(["delpeuch@clipper", "\~gourous/bin/su-gourous", "\~gourous/bin/moderate", "--"+action, cookie,
"delpeuch"], 6);
process.runAsync(["delpeuch", action, cookie], 3);
},
onAccept: function() {
......@@ -90,7 +85,7 @@ var ToolbarEvents = {
onReject: function() {
if(ToolbarEvents.currentCookie != '')
{
ToolbarEvents.runCmd("refuser", ToolbarEvents.currentCookie);
ToolbarEvents.runCmd("ignorer", ToolbarEvents.currentCookie);
}
},
......
<!ENTITY title.label "Hello World">
<!ENTITY separate.label "This is a separate window!">
<!ENTITY close.label "Close">
<!ENTITY title.label "Bonjour le monde">
<!ENTITY separate.label "Voilà une fenêtre séparée !">
<!ENTITY close.label "Fermer">
#!/bin/sh
export SSH_ASKPASS=/usr/lib/openssh/gnome-ssh-askpass
ssh $1@trolle.ens.fr \~gourous/bin/su-gourous \~gourous/bin/moderate --$2 $3 < /dev/null
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment