To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / deploy / provision.d / 020-users.sh @ 1612:2496b955f638
History | View | Annotate | Download (377 Bytes)
| 1 |
#!/bin/bash |
|---|---|
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
# The webapp directory is owned and run by the code user, in group |
| 6 |
# www-data. The repos and other things served directly are the other |
| 7 |
# way around -- owned by the www-data user, in group code. |
| 8 |
|
| 9 |
for user in code docgen ; do |
| 10 |
if ! grep -q "^$user:" /etc/passwd ; then |
| 11 |
groupadd "$user" |
| 12 |
useradd -g "$user" -G www-data "$user" |
| 13 |
fi |
| 14 |
done |
| 15 |
|