summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'libexec')
-rwxr-xr-xlibexec/plugins-hook4
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/plugins-hook b/libexec/plugins-hook
index c2cce60..bc2eddc 100755
--- a/libexec/plugins-hook
+++ b/libexec/plugins-hook
@@ -12,9 +12,11 @@
12# ANY WARRANTY, to the extent permitted by law; without even the implied 12# ANY WARRANTY, to the extent permitted by law; without even the implied
13# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 14
15set -u 15run_as='plugins'
16 16
17set -u
17export PATH='/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' 18export PATH='/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin'
19test $(whoami) = "$run_as" || exec sudo -u "$run_as" "$0" "$@"
18 20
19hook_name=${0##*/} 21hook_name=${0##*/}
20hook_directory="/home/plugins/libexec/$hook_name.d" 22hook_directory="/home/plugins/libexec/$hook_name.d"