To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / deploy / provision.d / 020-users.sh @ 1601:07deb8466f65

History | View | Annotate | Download (377 Bytes)

1 1577:e38eee2e1d47 Chris
#!/bin/bash
2
3
set -e
4
5 1590:c18460da6620 Chris
# 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 1589:94669513c53c Chris
9 1590:c18460da6620 Chris
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