Chris@1577: #!/bin/bash Chris@1577: Chris@1577: set -e Chris@1577: Chris@1590: # The webapp directory is owned and run by the code user, in group Chris@1590: # www-data. The repos and other things served directly are the other Chris@1590: # way around -- owned by the www-data user, in group code. Chris@1589: Chris@1590: for user in code docgen ; do Chris@1590: if ! grep -q "^$user:" /etc/passwd ; then Chris@1590: groupadd "$user" Chris@1590: useradd -g "$user" -G www-data "$user" Chris@1590: fi Chris@1590: done Chris@1577: