Added more Linux packaging configuration
This commit is contained in:
1 parent
6c5319c195
commit
c5b0db8de2
3 files changed
+36
-3
No files matched your search
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
GETENT_USER=$(getent passwd adept)
|
||||
GETENT_GROUP=$(getent group adept)
|
||||
|
||||
# Create the adept user if it doesn't already exist
|
||||
if [ "$GETENT_USER" = "" ]; then
|
||||
useradd -r adept
|
||||
else
|
||||
echo "The 'adept' user already exists, skipping creation."
|
||||
fi
|
||||
|
||||
# Create the adept group if it doesn't already exist
|
||||
if [ "$GETENT_GROUP" = "" ]; then
|
||||
groupadd adept
|
||||
usermod -aG adept adept
|
||||
else
|
||||
echo "The 'adept' group already exists, skipping creation."
|
||||
fi
|
||||
|
||||
# Change the directory ownership of /etc
|
||||
chown -R adept:adept /etc/adept
|
||||
Reference in new issue
Block a user