Advertisement
Guest User

Untitled

a guest
Jan 31st, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. prae@build test/build$ cat ../tklpatch/leechbox/conf
  2. #!/bin/bash -ex
  3.  
  4. # simple nfs test
  5.  
  6. export HOSTNAME=nfstest
  7. export USERNAME=test
  8. export GROUPNAME=test
  9.  
  10. # set hostname
  11. echo "$HOSTNAME" > /etc/hostname
  12. sed -i "s|127.0.1.1 \(.*\)|127.0.1.1 $HOSTNAME|" /etc/hosts
  13.  
  14. # create the nzb userid (which all the nzb daemons run as)
  15. groupadd $GROUPNAME
  16. useradd -c "App userid" -d /home/$USERNAME -g $GROUPNAME -m -s /bin/bash "$USERNAME"
  17. chown -R $USERNAME:$GROUPNAME /home/$USERNAME
  18.  
  19.  
  20. # add the python installation tools, sudo and nfs support
  21. apt-get update
  22. DEBIAN_FRONTEND=noninteractive apt-get -y \
  23. -o DPkg::Options::=--force-confdef \
  24. -o DPkg::Options::=--force-confold \
  25. install nfs-kernel-server nfs-common
  26.  
  27. service nfs-kernel-server stop
  28. service nfs-common stop
  29.  
  30. ####################################################
  31. # MAKE SURE ALL FILES HAVE CORRECT OWNER
  32. ####################################################
  33. chown -R $USERNAME:$GROUPNAME /home/$USERNAME
  34.  
  35. ####################################################
  36. # done!
  37. ####################################################
  38. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement