Files
fedora-infra_ansible/roles/copr/dist_git/files/copr-dist-git.hourly

9 lines
312 B
Bash
Executable File

#!/usr/bin/bash
(
flock -n 9 || exit 1
# ... commands executed under lock ...
CGIT_CONFIG="/etc/cgitrc.slow" /var/www/cgi-bin/cgit --scan-path=/var/lib/dist-git/git >/var/cache/cgit/repo-list.rc.new 2>/dev/null && mv -f /var/cache/cgit/repo-list.rc.new /var/cache/cgit/repo-list.rc
) 9>/var/lock/mylockfile