From fa4c7534dc7ccdd38ef56d624cdc9e9f23bc1caa Mon Sep 17 00:00:00 2001 From: milisbir Date: Fri, 21 Jul 2017 19:10:17 +0300 Subject: [PATCH] nginx-koskur --- talimatname/genel/nginx/nginx.kos-kur | 11 +++++++++++ 1 file changed, 11 insertions(+) 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