// Allow members of the 'decnet' group to manage DECNET systemd units // (start / stop / restart / reload) without a password prompt. // // Scope is locked to units matching `decnet-.service` or the // `decnet.target` grouping unit. Any other unit is unaffected by this // rule and still goes through the default polkit policy. // // Install: /etc/polkit-1/rules.d/50-decnet-workers.rules polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.systemd1.manage-units") { var unit = action.lookup("unit"); if (unit && /^decnet-[a-z]+\.service$|^decnet\.target$/.test(unit) && subject.isInGroup("decnet")) { return polkit.Result.YES; } } });