Skip to content

Commit

Permalink
Common: add stopService()
Browse files Browse the repository at this point in the history
  • Loading branch information
andyholmes committed Oct 4, 2017
1 parent c030686 commit 9e7d08d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,26 @@ imports.searchPath.push(getPath());


// Open the extension preferences window
function startPreferences() {
function startPreferences () {
try {
GLib.spawn_command_line_async(
"gnome-shell-extension-prefs [email protected]"
);
} catch (e) {
log("Error spawning GSConnect settings: " + e);
}
}
};


function stopService () {
try {
GLib.spawn_command_line_async(
"bash -c \"kill $(ps aux | grep '[email protected]/service/[d]aemon.js' | awk '{print $2}')\""
);
} catch (e) {
log("Error stopping GSConnect service: " + e);
}
};


/**
Expand Down

0 comments on commit 9e7d08d

Please sign in to comment.