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.

19 lines
544 B

  1. /*
  2. * Polkit authorization rules file
  3. *
  4. * This file defines a Polkit rule allowing the user acmed to restart
  5. * systemd services.
  6. *
  7. * For more information, see the polkit documentation:
  8. * https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html
  9. */
  10. polkit.addRule(function(action, subject) {
  11. if (action.id == "org.freedesktop.systemd1.manage-units") {
  12. if (subject.user == "acmed") {
  13. if (action.lookup("verb") == "restart") {
  14. return polkit.Result.YES;
  15. }
  16. }
  17. }
  18. });