annotate deploy/provision.d/020-users.sh @ 1628:9c5f8e24dadc live tip

Quieten this cron script
author Chris Cannam
date Tue, 25 Aug 2020 11:38:49 +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