annotate deploy/provision.d/020-users.sh @ 1590:c18460da6620 dockerise

Numerous deployment updates
author Chris Cannam
date Thu, 17 Aug 2017 16:04:36 +0100
parents 94669513c53c
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