8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 01:23:03 +01:00
firebird-mirror/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in
2005-04-29 18:24:44 +00:00

47 lines
829 B
Bash

#!/bin/sh
#------------------------------------------------------------------------
# Add new user and group
TryAddGroup() {
AdditionalParameter=$1
testStr=`grep firebird /etc/group`
if [ -z "$testStr" ]
then
groupadd $AdditionalParameter firebird
fi
}
TryAddUser() {
AdditionalParameter=$1
testStr=`grep firebird /etc/passwd`
if [ -z "$testStr" ]
then
useradd $AdditionalParameter -M -d $FBRootDir -s /bin/false \
-c "Firebird Database Owner" -g firebird firebird
fi
}
addFirebirdUser() {
TryAddGroup "-g 84 -r" >/dev/null 2>&1
TryAddGroup "-g 84" >/dev/null 2>&1
TryAddGroup "-r" >/dev/null 2>&1
TryAddGroup " "
TryAddUser "-u 84 -r" >/dev/null 2>&1
TryAddUser "-u 84" >/dev/null 2>&1
TryAddUser "-r" >/dev/null 2>&1
TryAddUser " "
}