diff options
author | B. Watson <urchlay@slackware.uk> | 2023-08-02 04:03:40 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-08-12 08:29:51 +0700 |
commit | 92cc6ab2943bd6eddfc1f436f3c7e5346f4ad4af (patch) | |
tree | 0189641ef601d7934372d128f98c06411e67ff0e /system/kapacitor | |
parent | a0d9c15065b131731699969fa740ac4e78532ac9 (diff) |
system/kapacitor: Show both useradd and groupadd if needed.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/kapacitor')
-rw-r--r-- | system/kapacitor/kapacitor.SlackBuild | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/system/kapacitor/kapacitor.SlackBuild b/system/kapacitor/kapacitor.SlackBuild index e127e58f83b0..0c455323fa57 100644 --- a/system/kapacitor/kapacitor.SlackBuild +++ b/system/kapacitor/kapacitor.SlackBuild @@ -39,14 +39,18 @@ if [ -z "$ARCH" ]; then fi UIDGID=351 + +nobuild() { + echo " You must have the \"$PRGNAM\" group and user to run this script." + echo " # groupadd -g $UIDGID $PRGNAM" + echo " # useradd -u $UIDGID -s /bin/false -d /var/lib/kapacitor -g $PRGNAM $PRGNAM" + exit 1 +} + if ! getent group $PRGNAM; then - echo " You must have the \"$PRGNAM\" group to run this script." - echo " # groupadd -g $UIDGID $PRGNAM" - exit 1 + nobuild elif ! getent passwd $PRGNAM; then - echo " You must have the \"$PRGNAM\" user to run this script." - echo " # useradd -u $UIDGID -s /bin/false -d /var/lib/kapacitor -g $PRGNAM $PRGNAM" - exit 1 + nobuild fi # If the variable PRINT_PACKAGE_NAME is set, then this script will report what |