Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- polkit.addRule(function(action, subject) {
- if (action.id == "org.freedesktop.consolekit.system.stop" ||
- action.id == "org.freedesktop.login1.power-off" ||
- action.id == "org.freedesktop.login1.power-off-multiple-sessions" ||
- action.id == "org.xfce.session.xfsm-shutdown-helper")
- {
- try{
- polkit.spawn(["/usr/bin/pendrive-reminder/check_pendrive.sh", subject.user]);
- return polkit.Result.YES;
- }catch(error){
- polkit.spawn(["/usr/bin/pendrive-reminder/send_notify.sh", subject.user]);
- return polkit.Result.NO;
- }
- }
- }
Add Comment
Please, Sign In to add comment