summaryrefslogtreecommitdiff
path: root/mldonkey/post-install
blob: 20bd056adbf7a4312720fb332d937a6ae11b9a2b (plain)
    1 #!/bin/sh
    2 
    3 MLUSER=mldonkey
    4 MLGROUP=mlusers
    5 MLPATH=/var/mlnet
    6 
    7 
    8 # check for mlusers group or add one if not exists
    9 /usr/bin/getent group $MLGROUP || /usr/sbin/groupadd $MLGROUP
   10 
   11 # check for mldonkey user or add one
   12 /usr/bin/getent passwd $MLUSER || /usr/sbin/useradd -g $MLGROUP -m -d $MLPATH $MLUSER
   13 
   14 # lock the account
   15 /usr/bin/passwd -l $MLUSER
   16 
   17 # setup bitperms
   18 [ ! -d $MLPATH ] && mkdir -p $MLPATH
   19 /bin/chmod 0775 $MLPATH
   20 /bin/chown root.$MLGROUP $MLPATH
   21 
   22 # End of file

Generated by cgit