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

19 lines
406 B
Text
Raw Normal View History

2017-07-21 19:10:17 +03:00
#!/bin/sh
2016-02-24 02:27:23 +02:00
id www 2>/dev/null
if [ $? -eq 0 ]; then
2017-04-25 20:29:54 +03:00
echo "www kullanicisi zaten tanimli"
2016-02-24 02:27:23 +02:00
else
2017-04-25 20:29:54 +03:00
echo "www kullanicisi olusturuldu"
2016-02-24 02:27:23 +02:00
useradd -M -s /bin/false -c "www user" www
fi
2017-07-21 19:10:17 +03:00
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