2009-07-28 21:07:51 +02:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
/usr/sbin/groupadd -f -K GID_MIN=100 -K GID_MAX=500 sogo
|
2009-07-29 15:11:46 +02:00
|
|
|
USERS=`getent passwd | grep sogo | sed -e 's/\([a-zA-Z]*\):.*/\1/g'`
|
2009-07-28 21:07:51 +02:00
|
|
|
|
|
|
|
|
2009-07-29 15:11:46 +02:00
|
|
|
if [ "$USERS" != "sogo" ] ; then
|
|
|
|
echo "Adding user sogo"
|
|
|
|
useradd -d /tmp -g sogo -K UID_MIN=100 -K UID_MAX=500 -K PASS_MAX_DAYS=-1 -s /bin/false sogo
|
2009-07-28 21:07:51 +02:00
|
|
|
fi
|
|
|
|
|
2009-07-29 15:11:46 +02:00
|
|
|
chown -R sogo /var/run/sogo
|
|
|
|
chown -R sogo /var/spool/sogo
|
|
|
|
chown -R sogo /var/log/sogo
|
2009-07-28 21:07:51 +02:00
|
|
|
update-rc.d sogod defaults
|
|
|
|
/sbin/ldconfig
|