fixup_queue: Move from jobs/ to fixupd/
[girocco.git] / fixupd / fixupd.sh
blob5429349dc59143dfcca8862eebb066aab701c413
1 #!/bin/bash
3 # THIS SCRIPT IS BEING RUN UNDER ROOT!!!
5 # [repo.or.cz] You will need to manually update this file if you modify
6 # it in the repository.
8 # Read projects from named pipe fixup.fifo and fixup permissions for them
10 ## Girocco::Config::reporoot
11 reporoot="/srv/git"
12 ## Girocco::Config::chroot
13 chroot="/home/repo/j"
14 ## Girocco::Config::mirror_user
15 mirror_user="repo"
16 ## Directory with this script and fixup.sh; WARNING: COPY THEM OVER to ~root!
17 ## Otherwise, the owner of these scripts can execute anything as root.
18 fixup_dir="/root/repomgr"
20 # Girocco::Config::fixup_queue
21 fixup_queue='/home/repo/repomgr/fixupd/fixup.fifo'
23 echo "Waiting for projects in $fixup_queue ..."
25 while read proj; do
26 echo "Invoking fixup for $proj"
27 "$fixup_dir/fixup.sh" "$proj" "$chroot/etc/group" "$mirror_user" &
28 done <>"$fixup_queue"