jobd: unify error/status reporting
[girocco.git] / fixupd / fixupd.sh
blob1cb8680e2b7f22a126b3a540602df6e510ae0872
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='/var/tmp/fixup.fifo'
23 cd "$reporoot"
25 echo "Waiting for projects in $fixup_queue ..."
27 while read proj; do
28 echo "Invoking fixup for $proj"
29 "$fixup_dir/fixup.sh" "$proj" "$chroot/etc/group" "$mirror_user" &
30 done <>"$fixup_queue"