2021-02-05 02:19:41 +01:00
|
|
|
#!/bin/sh -
|
|
|
|
|
2021-02-06 21:23:24 +01:00
|
|
|
usr=lighttpd
|
|
|
|
grp=${usr}
|
|
|
|
dir=${usr}
|
2021-02-05 02:19:41 +01:00
|
|
|
|
2021-02-06 21:23:24 +01:00
|
|
|
getent group ${grp} || groupadd -r ${grp}
|
|
|
|
|
|
|
|
if [ -z "`getent passwd ${usr}`" ]; then
|
|
|
|
useradd -r -g ${grp} -d /var/www/${usr} -s /bin/false ${usr}
|
|
|
|
passwd -l ${usr}
|
2021-02-05 02:19:41 +01:00
|
|
|
fi
|
|
|
|
|
2021-02-06 21:23:24 +01:00
|
|
|
chown ${usr}:daemon /var/log/${usr} /var/lib/${usr}
|