mirror of https://github.com/breard-r/acmed.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
684 B
20 lines
684 B
/*
|
|
* Polkit authorization rules file
|
|
*
|
|
* This file defines a Polkit rule allowing the user acmed to restart
|
|
* systemd services.
|
|
*
|
|
* For more information, see the polkit documentation:
|
|
* https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html
|
|
*/
|
|
|
|
polkit.addRule(function(action, subject) {
|
|
if (action.id == "org.freedesktop.systemd1.manage-units") {
|
|
if (subject.user == "acmed") {
|
|
var verb = action.lookup("verb");
|
|
if (verb == "reload" || verb == "restart" || verb == "try-restart" || verb == "reload-or-restart" || verb == "try-reload-or-restart") {
|
|
return polkit.Result.YES;
|
|
}
|
|
}
|
|
}
|
|
});
|