Commit 1258ffd4 authored by Slugger@Github's avatar Slugger@Github
Browse files

cleanup group and user tests

parent b41bb19f
Pipeline #66219 passed with stages
in 1 minute and 38 seconds
......@@ -19,15 +19,11 @@
SVCUSER=piawgmgr
# Create the service group
/bin/cat /etc/group | grep -q "^$SVCUSER"
RC=$?
if [ "$RC" != "0" ]; then
if grep -q "^$SVCUSER" /etc/group ;then
/usr/sbin/addgroup -S $SVCUSER
fi
# Create the service user
/usr/bin/id $SVCUSER >> /dev/null 2>&1
RC=$?
if [ "$RC" != "0" ]; then
if grep -q "^$SVCUSER" /etc/passwd ;then
/usr/sbin/adduser -H -D -S -G $SVCUSER -s /sbin/nologin $SVCUSER
fi
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment