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

19 lines
406 B
Plaintext
Raw Normal View History

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