diff --git a/talimatname/genel/nginx/nginx.kos-kur b/talimatname/genel/nginx/nginx.kos-kur index e29eb6e42..6f04d678a 100644 --- a/talimatname/genel/nginx/nginx.kos-kur +++ b/talimatname/genel/nginx/nginx.kos-kur @@ -1,3 +1,5 @@ +#!/bin/sh + id www 2>/dev/null if [ $? -eq 0 ]; then echo "www kullanicisi zaten tanimli" @@ -5,3 +7,12 @@ else echo "www kullanicisi olusturuldu" useradd -M -s /bin/false -c "www user" www fi + +if [ -z "`getent group nginx`" ]; then + /sbin/groupadd --system nginx +fi + +if [ -z "`getent passwd nginx`" ]; then + /sbin/useradd -r -g nginx -d /etc/nginx -s /bin/false -c "nginx server" nginx + /bin/passwd -l nginx +fi