Mercurial > hg > soundsoftware-site
annotate deploy/provision.d/020-users.sh @ 1600:ed9c467ef922 dockerise
Add hggit extension
author | Chris Cannam |
---|---|
date | Wed, 23 Aug 2017 11:32:50 +0100 |
parents | c18460da6620 |
children |
rev | line source |
---|---|
Chris@1577 | 1 #!/bin/bash |
Chris@1577 | 2 |
Chris@1577 | 3 set -e |
Chris@1577 | 4 |
Chris@1590 | 5 # The webapp directory is owned and run by the code user, in group |
Chris@1590 | 6 # www-data. The repos and other things served directly are the other |
Chris@1590 | 7 # way around -- owned by the www-data user, in group code. |
Chris@1589 | 8 |
Chris@1590 | 9 for user in code docgen ; do |
Chris@1590 | 10 if ! grep -q "^$user:" /etc/passwd ; then |
Chris@1590 | 11 groupadd "$user" |
Chris@1590 | 12 useradd -g "$user" -G www-data "$user" |
Chris@1590 | 13 fi |
Chris@1590 | 14 done |
Chris@1577 | 15 |