mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-19 18:29:37 +00:00
Merge 797dba2448 into 626596b192
This commit is contained in:
commit
2063a67c0c
1 changed files with 2 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ add_user() {
|
||||||
declare -r descr="${4:-No description}"
|
declare -r descr="${4:-No description}"
|
||||||
declare -r shell="${5:-/bin/false}"
|
declare -r shell="${5:-/bin/false}"
|
||||||
|
|
||||||
if ! getent passwd | grep -q "^$user:"; then
|
if ! getent passwd "$user" 2>&1 >/dev/null; then
|
||||||
echo "Creating system user: $user in $group with $descr and shell $shell"
|
echo "Creating system user: $user in $group with $descr and shell $shell"
|
||||||
useradd $uid_flags --gid $group --no-create-home --system --shell $shell -c "$descr" $user
|
useradd $uid_flags --gid $group --no-create-home --system --shell $shell -c "$descr" $user
|
||||||
fi
|
fi
|
||||||
|
|
@ -39,7 +39,7 @@ add_group() {
|
||||||
declare -r gid_flags="--gid $gid"
|
declare -r gid_flags="--gid $gid"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! getent group | grep -q "^$group:" ; then
|
if ! getent group "$group" 2>&1 >/dev/null; then
|
||||||
echo "Creating system group: $group"
|
echo "Creating system group: $group"
|
||||||
groupadd $gid_flags --system $group
|
groupadd $gid_flags --system $group
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue