3 # Send notification through the taskd socket
5 # Beware, we MAY be running in a chroot!
9 sockpath
=/etc
/taskd.socket
10 reporoot
=/@jailreporoot@
13 if [ -x /usr
/bin
/perl
]; then
17 sockpath
="$cfg_chroot$sockpath"
18 reporoot
="$cfg_reporoot"
20 # authuser needs to be set if not running in the chroot.
21 # Currently that can only be the case with https push in
22 # which case REMOTE_USER will contain the user name (possibly prefixed
23 # with "/UID=" and suffixed with "/dnQualifier=...").
24 # Fallback is the mirror_user if REMOTE_USER is not set.
25 authuser
="${REMOTE_USER#/UID=}"
26 authuser
="${authuser%/dnQualifier=*}"
27 [ -n authuser
] || authuser
="$cfg_mirror_user"
30 nc_openbsd
() { /bin
/nc.openbsd
"$@"; }
32 projname
="${cwd#$reporoot/}"
34 [ -S "$sockpath" ] ||
exit 0
37 echo "ref-change $authuser ${projname%.git} $line" | nc_openbsd
-w 1 -U "$sockpath"