milis/talimatname/genel/nginx/nginx.kos-kur

19 lines
406 B
Bash

#!/bin/sh
id www 2>/dev/null
if [ $? -eq 0 ]; then
echo "www kullanicisi zaten tanimli"
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