14 lines
293 B
Bash
14 lines
293 B
Bash
#!/bin/sh -
|
|
|
|
usr=lighttpd
|
|
grp=${usr}
|
|
dir=${usr}
|
|
|
|
getent group ${grp} >/dev/null || groupadd -r ${grp}
|
|
getent passwd ${usr} >/dev/null 2>&1 || {
|
|
useradd -r -g ${grp} -d /var/www/${dir} -s /bin/false ${usr}
|
|
passwd -l ${usr}
|
|
}
|
|
|
|
chown ${usr}:daemon /var/log/${usr} /var/lib/${usr}
|