nginx.kos-kur 406 B

12345678910111213141516171819
  1. #!/bin/sh
  2. id www 2>/dev/null
  3. if [ $? -eq 0 ]; then
  4. echo "www kullanicisi zaten tanimli"
  5. else
  6. echo "www kullanicisi olusturuldu"
  7. useradd -M -s /bin/false -c "www user" www
  8. fi
  9. if [ -z "`getent group nginx`" ]; then
  10. /sbin/groupadd --system nginx
  11. fi
  12. if [ -z "`getent passwd nginx`" ]; then
  13. /sbin/useradd -r -g nginx -d /etc/nginx -s /bin/false -c "nginx server" nginx
  14. /bin/passwd -l nginx
  15. fi