2007-05-15 02:09:31 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2007-12-19 01:03:50 +01:00
|
|
|
MLUSER=mldonkey
|
|
|
|
MLGROUP=mlusers
|
|
|
|
MLPATH=/var/mlnet
|
|
|
|
|
|
|
|
|
2007-05-15 02:09:31 +02:00
|
|
|
# check for mlusers group or add one if not exists
|
2008-01-15 19:01:31 +01:00
|
|
|
/usr/bin/getent group $MLGROUP || /usr/sbin/groupadd $MLGROUP
|
2007-05-15 02:09:31 +02:00
|
|
|
|
|
|
|
# check for mldonkey user or add one
|
2008-01-15 19:01:31 +01:00
|
|
|
/usr/bin/getent passwd $MLUSER || /usr/sbin/useradd -g $MLGROUP -m -d $MLPATH $MLUSER
|
2007-05-15 02:09:31 +02:00
|
|
|
|
|
|
|
# lock the account
|
2008-01-15 19:01:31 +01:00
|
|
|
/usr/bin/passwd -l $MLUSER
|
2007-12-19 01:03:50 +01:00
|
|
|
|
|
|
|
# setup bitperms
|
2008-01-25 02:48:37 +01:00
|
|
|
[ ! -d $MLPATH ] && mkdir -p $MLPATH
|
2008-01-15 19:01:31 +01:00
|
|
|
/bin/chmod 0775 $MLPATH
|
|
|
|
/bin/chown root.$MLGROUP $MLPATH
|
2007-05-15 02:09:31 +02:00
|
|
|
|
2007-12-19 01:03:50 +01:00
|
|
|
# End of file
|