annotate deploy/provision.d/115-other-dirs.sh @ 1600:ed9c467ef922 dockerise

Add hggit extension
author Chris Cannam
date Wed, 23 Aug 2017 11:32:50 +0100
parents 073a75bf07fb
children 90bed4e10cc8
rev   line source
Chris@1598 1 #!/bin/bash
Chris@1598 2
Chris@1598 3 set -e
Chris@1598 4
Chris@1598 5 # Initialise directories used as targets for cron activity (if they
Chris@1598 6 # don't already exist)
Chris@1598 7
Chris@1598 8 # Reminder: the webapp directory is owned and run by the code user, in
Chris@1598 9 # group www-data. The repos and other things served directly are
Chris@1598 10 # usually the other way around -- owned by the www-data user, in group
Chris@1598 11 # code. I don't recall whether there is a good reason for this.
Chris@1598 12
Chris@1598 13 for dir in \
Chris@1598 14 /var/files/backups \
Chris@1598 15 /var/doc \
Chris@1598 16 /var/files/git-mirror ; do
Chris@1598 17 if [ ! -d "$dir" ]; then
Chris@1598 18 mkdir -p "$dir"
Chris@1598 19 chown -R code.www-data "$dir"
Chris@1598 20 chmod g+s "$dir"
Chris@1598 21 fi
Chris@1598 22 done
Chris@1598 23
Chris@1598 24 for dir in \
Chris@1598 25 /var/mirror ; do
Chris@1598 26 if [ ! -d "$dir" ]; then
Chris@1598 27 mkdir -p "$dir"
Chris@1598 28 chown -R www-data.code "$dir"
Chris@1598 29 chmod g+s "$dir"
Chris@1598 30 fi
Chris@1598 31 done