From d0ff27c45c1a52206b968cc026d33e0c730907e3 Mon Sep 17 00:00:00 2001 From: Igor Chudov Date: Mon, 23 Mar 2020 16:07:18 +0400 Subject: [PATCH] gpupdate-setup script added to atomize actions of Group Policy switch --- dist/gpupdate-setup | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 dist/gpupdate-setup diff --git a/dist/gpupdate-setup b/dist/gpupdate-setup new file mode 100755 index 0000000..fbc6c28 --- /dev/null +++ b/dist/gpupdate-setup @@ -0,0 +1,32 @@ +#! /bin/sh +# +# GPOA - GPO Applier for Linux +# +# Copyright (C) 2019-2020 BaseALT Ltd. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +set -eu + +main() { + # Enable oddjobd_gpupdate in PAM config + /usr/sbin/control system-policy gpupdate + # Bootstrap the Group Policy engine + /usr/sbin/gpoa --nodomain + # Enable gpupdate-setup.service for all users + systemctl --global --user enable gpupdate-setup.service +} + +main +