diff options
-rwxr-xr-x | libexec/plugins-hook | 4 |
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 | ||
15 | set -u | 15 | run_as='plugins' |
16 | 16 | ||
17 | set -u | ||
17 | export PATH='/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' | 18 | export PATH='/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' |
19 | test $(whoami) = "$run_as" || exec sudo -u "$run_as" "$0" "$@" | ||
18 | 20 | ||
19 | hook_name=${0##*/} | 21 | hook_name=${0##*/} |
20 | hook_directory="/home/plugins/libexec/$hook_name.d" | 22 | hook_directory="/home/plugins/libexec/$hook_name.d" |